POST Approves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.
{{baseUrl}}/v1/:name:approve
QUERY PARAMS

name
BODY json

{
  "approvalResult": {
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:approve");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/:name:approve" {:content-type :json
                                                             :form-params {:approvalResult {:approvalTime ""
                                                                                            :approverAccount ""
                                                                                            :comment ""
                                                                                            :decision ""
                                                                                            :url ""}}})
require "http/client"

url = "{{baseUrl}}/v1/:name:approve"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/:name:approve"),
    Content = new StringContent("{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:approve");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:name:approve"

	payload := strings.NewReader("{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/:name:approve HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 133

{
  "approvalResult": {
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:approve")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:name:approve"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:name:approve")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:approve")
  .header("content-type", "application/json")
  .body("{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  approvalResult: {
    approvalTime: '',
    approverAccount: '',
    comment: '',
    decision: '',
    url: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/:name:approve');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:approve',
  headers: {'content-type': 'application/json'},
  data: {
    approvalResult: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:name:approve';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approvalResult":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:name:approve',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "approvalResult": {\n    "approvalTime": "",\n    "approverAccount": "",\n    "comment": "",\n    "decision": "",\n    "url": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:name:approve")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:name:approve',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  approvalResult: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:approve',
  headers: {'content-type': 'application/json'},
  body: {
    approvalResult: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''}
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/:name:approve');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  approvalResult: {
    approvalTime: '',
    approverAccount: '',
    comment: '',
    decision: '',
    url: ''
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:approve',
  headers: {'content-type': 'application/json'},
  data: {
    approvalResult: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:name:approve';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approvalResult":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"approvalResult": @{ @"approvalTime": @"", @"approverAccount": @"", @"comment": @"", @"decision": @"", @"url": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:approve"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:name:approve" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:name:approve",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'approvalResult' => [
        'approvalTime' => '',
        'approverAccount' => '',
        'comment' => '',
        'decision' => '',
        'url' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:approve', [
  'body' => '{
  "approvalResult": {
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:approve');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'approvalResult' => [
    'approvalTime' => '',
    'approverAccount' => '',
    'comment' => '',
    'decision' => '',
    'url' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'approvalResult' => [
    'approvalTime' => '',
    'approverAccount' => '',
    'comment' => '',
    'decision' => '',
    'url' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:approve');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:approve' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approvalResult": {
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:approve' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approvalResult": {
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/:name:approve", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:name:approve"

payload = { "approvalResult": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
    } }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:name:approve"

payload <- "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:name:approve")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/:name:approve') do |req|
  req.body = "{\n  \"approvalResult\": {\n    \"approvalTime\": \"\",\n    \"approverAccount\": \"\",\n    \"comment\": \"\",\n    \"decision\": \"\",\n    \"url\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:name:approve";

    let payload = json!({"approvalResult": json!({
            "approvalTime": "",
            "approverAccount": "",
            "comment": "",
            "decision": "",
            "url": ""
        })});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/:name:approve \
  --header 'content-type: application/json' \
  --data '{
  "approvalResult": {
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  }
}'
echo '{
  "approvalResult": {
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  }
}' |  \
  http POST {{baseUrl}}/v1/:name:approve \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "approvalResult": {\n    "approvalTime": "",\n    "approverAccount": "",\n    "comment": "",\n    "decision": "",\n    "url": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/:name:approve
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["approvalResult": [
    "approvalTime": "",
    "approverAccount": "",
    "comment": "",
    "decision": "",
    "url": ""
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:approve")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Cancels a build in progress.
{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel
QUERY PARAMS

projectId
id
BODY json

{
  "id": "",
  "name": "",
  "projectId": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel" {:content-type :json
                                                                                     :form-params {:id ""
                                                                                                   :name ""
                                                                                                   :projectId ""}})
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel"),
    Content = new StringContent("{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel"

	payload := strings.NewReader("{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/projects/:projectId/builds/:id:cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 47

{
  "id": "",
  "name": "",
  "projectId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel")
  .header("content-type", "application/json")
  .body("{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  id: '',
  name: '',
  projectId: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel',
  headers: {'content-type': 'application/json'},
  data: {id: '', name: '', projectId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"id":"","name":"","projectId":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "id": "",\n  "name": "",\n  "projectId": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/builds/:id:cancel',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({id: '', name: '', projectId: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel',
  headers: {'content-type': 'application/json'},
  body: {id: '', name: '', projectId: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  id: '',
  name: '',
  projectId: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel',
  headers: {'content-type': 'application/json'},
  data: {id: '', name: '', projectId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"id":"","name":"","projectId":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"id": @"",
                              @"name": @"",
                              @"projectId": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'id' => '',
    'name' => '',
    'projectId' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel', [
  'body' => '{
  "id": "",
  "name": "",
  "projectId": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'id' => '',
  'name' => '',
  'projectId' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'id' => '',
  'name' => '',
  'projectId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "id": "",
  "name": "",
  "projectId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "id": "",
  "name": "",
  "projectId": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/projects/:projectId/builds/:id:cancel", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel"

payload = {
    "id": "",
    "name": "",
    "projectId": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel"

payload <- "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/projects/:projectId/builds/:id:cancel') do |req|
  req.body = "{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"projectId\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel";

    let payload = json!({
        "id": "",
        "name": "",
        "projectId": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/projects/:projectId/builds/:id:cancel \
  --header 'content-type: application/json' \
  --data '{
  "id": "",
  "name": "",
  "projectId": ""
}'
echo '{
  "id": "",
  "name": "",
  "projectId": ""
}' |  \
  http POST {{baseUrl}}/v1/projects/:projectId/builds/:id:cancel \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "id": "",\n  "name": "",\n  "projectId": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/builds/:id:cancel
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "id": "",
  "name": "",
  "projectId": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/builds/:id:cancel")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Create an association between a GCP project and a GitHub Enterprise server. This API is experimental.
{{baseUrl}}/v1/:parent/githubEnterpriseConfigs
QUERY PARAMS

parent
BODY json

{
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": {
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  },
  "sslCa": "",
  "webhookKey": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs" {:content-type :json
                                                                               :form-params {:appId ""
                                                                                             :createTime ""
                                                                                             :displayName ""
                                                                                             :hostUrl ""
                                                                                             :name ""
                                                                                             :peeredNetwork ""
                                                                                             :secrets {:oauthClientIdName ""
                                                                                                       :oauthClientIdVersionName ""
                                                                                                       :oauthSecretName ""
                                                                                                       :oauthSecretVersionName ""
                                                                                                       :privateKeyName ""
                                                                                                       :privateKeyVersionName ""
                                                                                                       :webhookSecretName ""
                                                                                                       :webhookSecretVersionName ""}
                                                                                             :sslCa ""
                                                                                             :webhookKey ""}})
require "http/client"

url = "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"),
    Content = new StringContent("{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"

	payload := strings.NewReader("{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/:parent/githubEnterpriseConfigs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 416

{
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": {
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  },
  "sslCa": "",
  "webhookKey": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .header("content-type", "application/json")
  .body("{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  appId: '',
  createTime: '',
  displayName: '',
  hostUrl: '',
  name: '',
  peeredNetwork: '',
  secrets: {
    oauthClientIdName: '',
    oauthClientIdVersionName: '',
    oauthSecretName: '',
    oauthSecretVersionName: '',
    privateKeyName: '',
    privateKeyVersionName: '',
    webhookSecretName: '',
    webhookSecretVersionName: ''
  },
  sslCa: '',
  webhookKey: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs',
  headers: {'content-type': 'application/json'},
  data: {
    appId: '',
    createTime: '',
    displayName: '',
    hostUrl: '',
    name: '',
    peeredNetwork: '',
    secrets: {
      oauthClientIdName: '',
      oauthClientIdVersionName: '',
      oauthSecretName: '',
      oauthSecretVersionName: '',
      privateKeyName: '',
      privateKeyVersionName: '',
      webhookSecretName: '',
      webhookSecretVersionName: ''
    },
    sslCa: '',
    webhookKey: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"appId":"","createTime":"","displayName":"","hostUrl":"","name":"","peeredNetwork":"","secrets":{"oauthClientIdName":"","oauthClientIdVersionName":"","oauthSecretName":"","oauthSecretVersionName":"","privateKeyName":"","privateKeyVersionName":"","webhookSecretName":"","webhookSecretVersionName":""},"sslCa":"","webhookKey":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "appId": "",\n  "createTime": "",\n  "displayName": "",\n  "hostUrl": "",\n  "name": "",\n  "peeredNetwork": "",\n  "secrets": {\n    "oauthClientIdName": "",\n    "oauthClientIdVersionName": "",\n    "oauthSecretName": "",\n    "oauthSecretVersionName": "",\n    "privateKeyName": "",\n    "privateKeyVersionName": "",\n    "webhookSecretName": "",\n    "webhookSecretVersionName": ""\n  },\n  "sslCa": "",\n  "webhookKey": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/githubEnterpriseConfigs',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  appId: '',
  createTime: '',
  displayName: '',
  hostUrl: '',
  name: '',
  peeredNetwork: '',
  secrets: {
    oauthClientIdName: '',
    oauthClientIdVersionName: '',
    oauthSecretName: '',
    oauthSecretVersionName: '',
    privateKeyName: '',
    privateKeyVersionName: '',
    webhookSecretName: '',
    webhookSecretVersionName: ''
  },
  sslCa: '',
  webhookKey: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs',
  headers: {'content-type': 'application/json'},
  body: {
    appId: '',
    createTime: '',
    displayName: '',
    hostUrl: '',
    name: '',
    peeredNetwork: '',
    secrets: {
      oauthClientIdName: '',
      oauthClientIdVersionName: '',
      oauthSecretName: '',
      oauthSecretVersionName: '',
      privateKeyName: '',
      privateKeyVersionName: '',
      webhookSecretName: '',
      webhookSecretVersionName: ''
    },
    sslCa: '',
    webhookKey: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  appId: '',
  createTime: '',
  displayName: '',
  hostUrl: '',
  name: '',
  peeredNetwork: '',
  secrets: {
    oauthClientIdName: '',
    oauthClientIdVersionName: '',
    oauthSecretName: '',
    oauthSecretVersionName: '',
    privateKeyName: '',
    privateKeyVersionName: '',
    webhookSecretName: '',
    webhookSecretVersionName: ''
  },
  sslCa: '',
  webhookKey: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs',
  headers: {'content-type': 'application/json'},
  data: {
    appId: '',
    createTime: '',
    displayName: '',
    hostUrl: '',
    name: '',
    peeredNetwork: '',
    secrets: {
      oauthClientIdName: '',
      oauthClientIdVersionName: '',
      oauthSecretName: '',
      oauthSecretVersionName: '',
      privateKeyName: '',
      privateKeyVersionName: '',
      webhookSecretName: '',
      webhookSecretVersionName: ''
    },
    sslCa: '',
    webhookKey: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"appId":"","createTime":"","displayName":"","hostUrl":"","name":"","peeredNetwork":"","secrets":{"oauthClientIdName":"","oauthClientIdVersionName":"","oauthSecretName":"","oauthSecretVersionName":"","privateKeyName":"","privateKeyVersionName":"","webhookSecretName":"","webhookSecretVersionName":""},"sslCa":"","webhookKey":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"appId": @"",
                              @"createTime": @"",
                              @"displayName": @"",
                              @"hostUrl": @"",
                              @"name": @"",
                              @"peeredNetwork": @"",
                              @"secrets": @{ @"oauthClientIdName": @"", @"oauthClientIdVersionName": @"", @"oauthSecretName": @"", @"oauthSecretVersionName": @"", @"privateKeyName": @"", @"privateKeyVersionName": @"", @"webhookSecretName": @"", @"webhookSecretVersionName": @"" },
                              @"sslCa": @"",
                              @"webhookKey": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'appId' => '',
    'createTime' => '',
    'displayName' => '',
    'hostUrl' => '',
    'name' => '',
    'peeredNetwork' => '',
    'secrets' => [
        'oauthClientIdName' => '',
        'oauthClientIdVersionName' => '',
        'oauthSecretName' => '',
        'oauthSecretVersionName' => '',
        'privateKeyName' => '',
        'privateKeyVersionName' => '',
        'webhookSecretName' => '',
        'webhookSecretVersionName' => ''
    ],
    'sslCa' => '',
    'webhookKey' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs', [
  'body' => '{
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": {
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  },
  "sslCa": "",
  "webhookKey": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'appId' => '',
  'createTime' => '',
  'displayName' => '',
  'hostUrl' => '',
  'name' => '',
  'peeredNetwork' => '',
  'secrets' => [
    'oauthClientIdName' => '',
    'oauthClientIdVersionName' => '',
    'oauthSecretName' => '',
    'oauthSecretVersionName' => '',
    'privateKeyName' => '',
    'privateKeyVersionName' => '',
    'webhookSecretName' => '',
    'webhookSecretVersionName' => ''
  ],
  'sslCa' => '',
  'webhookKey' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'appId' => '',
  'createTime' => '',
  'displayName' => '',
  'hostUrl' => '',
  'name' => '',
  'peeredNetwork' => '',
  'secrets' => [
    'oauthClientIdName' => '',
    'oauthClientIdVersionName' => '',
    'oauthSecretName' => '',
    'oauthSecretVersionName' => '',
    'privateKeyName' => '',
    'privateKeyVersionName' => '',
    'webhookSecretName' => '',
    'webhookSecretVersionName' => ''
  ],
  'sslCa' => '',
  'webhookKey' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": {
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  },
  "sslCa": "",
  "webhookKey": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": {
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  },
  "sslCa": "",
  "webhookKey": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/:parent/githubEnterpriseConfigs", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"

payload = {
    "appId": "",
    "createTime": "",
    "displayName": "",
    "hostUrl": "",
    "name": "",
    "peeredNetwork": "",
    "secrets": {
        "oauthClientIdName": "",
        "oauthClientIdVersionName": "",
        "oauthSecretName": "",
        "oauthSecretVersionName": "",
        "privateKeyName": "",
        "privateKeyVersionName": "",
        "webhookSecretName": "",
        "webhookSecretVersionName": ""
    },
    "sslCa": "",
    "webhookKey": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"

payload <- "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/:parent/githubEnterpriseConfigs') do |req|
  req.body = "{\n  \"appId\": \"\",\n  \"createTime\": \"\",\n  \"displayName\": \"\",\n  \"hostUrl\": \"\",\n  \"name\": \"\",\n  \"peeredNetwork\": \"\",\n  \"secrets\": {\n    \"oauthClientIdName\": \"\",\n    \"oauthClientIdVersionName\": \"\",\n    \"oauthSecretName\": \"\",\n    \"oauthSecretVersionName\": \"\",\n    \"privateKeyName\": \"\",\n    \"privateKeyVersionName\": \"\",\n    \"webhookSecretName\": \"\",\n    \"webhookSecretVersionName\": \"\"\n  },\n  \"sslCa\": \"\",\n  \"webhookKey\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs";

    let payload = json!({
        "appId": "",
        "createTime": "",
        "displayName": "",
        "hostUrl": "",
        "name": "",
        "peeredNetwork": "",
        "secrets": json!({
            "oauthClientIdName": "",
            "oauthClientIdVersionName": "",
            "oauthSecretName": "",
            "oauthSecretVersionName": "",
            "privateKeyName": "",
            "privateKeyVersionName": "",
            "webhookSecretName": "",
            "webhookSecretVersionName": ""
        }),
        "sslCa": "",
        "webhookKey": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/:parent/githubEnterpriseConfigs \
  --header 'content-type: application/json' \
  --data '{
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": {
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  },
  "sslCa": "",
  "webhookKey": ""
}'
echo '{
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": {
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  },
  "sslCa": "",
  "webhookKey": ""
}' |  \
  http POST {{baseUrl}}/v1/:parent/githubEnterpriseConfigs \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "appId": "",\n  "createTime": "",\n  "displayName": "",\n  "hostUrl": "",\n  "name": "",\n  "peeredNetwork": "",\n  "secrets": {\n    "oauthClientIdName": "",\n    "oauthClientIdVersionName": "",\n    "oauthSecretName": "",\n    "oauthSecretVersionName": "",\n    "privateKeyName": "",\n    "privateKeyVersionName": "",\n    "webhookSecretName": "",\n    "webhookSecretVersionName": ""\n  },\n  "sslCa": "",\n  "webhookKey": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1/:parent/githubEnterpriseConfigs
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "appId": "",
  "createTime": "",
  "displayName": "",
  "hostUrl": "",
  "name": "",
  "peeredNetwork": "",
  "secrets": [
    "oauthClientIdName": "",
    "oauthClientIdVersionName": "",
    "oauthSecretName": "",
    "oauthSecretVersionName": "",
    "privateKeyName": "",
    "privateKeyVersionName": "",
    "webhookSecretName": "",
    "webhookSecretVersionName": ""
  ],
  "sslCa": "",
  "webhookKey": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Creates a `WorkerPool`.
{{baseUrl}}/v1/:parent/workerPools
QUERY PARAMS

parent
BODY json

{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/workerPools");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/:parent/workerPools" {:content-type :json
                                                                   :form-params {:annotations {}
                                                                                 :createTime ""
                                                                                 :deleteTime ""
                                                                                 :displayName ""
                                                                                 :etag ""
                                                                                 :name ""
                                                                                 :privatePoolV1Config {:networkConfig {:egressOption ""
                                                                                                                       :peeredNetwork ""}
                                                                                                       :workerConfig {:diskSizeGb ""
                                                                                                                      :machineType ""}}
                                                                                 :state ""
                                                                                 :uid ""
                                                                                 :updateTime ""}})
require "http/client"

url = "{{baseUrl}}/v1/:parent/workerPools"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/workerPools"),
    Content = new StringContent("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/workerPools");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/workerPools"

	payload := strings.NewReader("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/:parent/workerPools HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 350

{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/workerPools")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/workerPools"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/workerPools")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/workerPools")
  .header("content-type", "application/json")
  .body("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  annotations: {},
  createTime: '',
  deleteTime: '',
  displayName: '',
  etag: '',
  name: '',
  privatePoolV1Config: {
    networkConfig: {
      egressOption: '',
      peeredNetwork: ''
    },
    workerConfig: {
      diskSizeGb: '',
      machineType: ''
    }
  },
  state: '',
  uid: '',
  updateTime: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/:parent/workerPools');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/workerPools',
  headers: {'content-type': 'application/json'},
  data: {
    annotations: {},
    createTime: '',
    deleteTime: '',
    displayName: '',
    etag: '',
    name: '',
    privatePoolV1Config: {
      networkConfig: {egressOption: '', peeredNetwork: ''},
      workerConfig: {diskSizeGb: '', machineType: ''}
    },
    state: '',
    uid: '',
    updateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/workerPools';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"annotations":{},"createTime":"","deleteTime":"","displayName":"","etag":"","name":"","privatePoolV1Config":{"networkConfig":{"egressOption":"","peeredNetwork":""},"workerConfig":{"diskSizeGb":"","machineType":""}},"state":"","uid":"","updateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/workerPools',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "annotations": {},\n  "createTime": "",\n  "deleteTime": "",\n  "displayName": "",\n  "etag": "",\n  "name": "",\n  "privatePoolV1Config": {\n    "networkConfig": {\n      "egressOption": "",\n      "peeredNetwork": ""\n    },\n    "workerConfig": {\n      "diskSizeGb": "",\n      "machineType": ""\n    }\n  },\n  "state": "",\n  "uid": "",\n  "updateTime": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/workerPools")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/workerPools',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  annotations: {},
  createTime: '',
  deleteTime: '',
  displayName: '',
  etag: '',
  name: '',
  privatePoolV1Config: {
    networkConfig: {egressOption: '', peeredNetwork: ''},
    workerConfig: {diskSizeGb: '', machineType: ''}
  },
  state: '',
  uid: '',
  updateTime: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/workerPools',
  headers: {'content-type': 'application/json'},
  body: {
    annotations: {},
    createTime: '',
    deleteTime: '',
    displayName: '',
    etag: '',
    name: '',
    privatePoolV1Config: {
      networkConfig: {egressOption: '', peeredNetwork: ''},
      workerConfig: {diskSizeGb: '', machineType: ''}
    },
    state: '',
    uid: '',
    updateTime: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/:parent/workerPools');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  annotations: {},
  createTime: '',
  deleteTime: '',
  displayName: '',
  etag: '',
  name: '',
  privatePoolV1Config: {
    networkConfig: {
      egressOption: '',
      peeredNetwork: ''
    },
    workerConfig: {
      diskSizeGb: '',
      machineType: ''
    }
  },
  state: '',
  uid: '',
  updateTime: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/workerPools',
  headers: {'content-type': 'application/json'},
  data: {
    annotations: {},
    createTime: '',
    deleteTime: '',
    displayName: '',
    etag: '',
    name: '',
    privatePoolV1Config: {
      networkConfig: {egressOption: '', peeredNetwork: ''},
      workerConfig: {diskSizeGb: '', machineType: ''}
    },
    state: '',
    uid: '',
    updateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/workerPools';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"annotations":{},"createTime":"","deleteTime":"","displayName":"","etag":"","name":"","privatePoolV1Config":{"networkConfig":{"egressOption":"","peeredNetwork":""},"workerConfig":{"diskSizeGb":"","machineType":""}},"state":"","uid":"","updateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"annotations": @{  },
                              @"createTime": @"",
                              @"deleteTime": @"",
                              @"displayName": @"",
                              @"etag": @"",
                              @"name": @"",
                              @"privatePoolV1Config": @{ @"networkConfig": @{ @"egressOption": @"", @"peeredNetwork": @"" }, @"workerConfig": @{ @"diskSizeGb": @"", @"machineType": @"" } },
                              @"state": @"",
                              @"uid": @"",
                              @"updateTime": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/workerPools"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/workerPools" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/workerPools",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'annotations' => [
        
    ],
    'createTime' => '',
    'deleteTime' => '',
    'displayName' => '',
    'etag' => '',
    'name' => '',
    'privatePoolV1Config' => [
        'networkConfig' => [
                'egressOption' => '',
                'peeredNetwork' => ''
        ],
        'workerConfig' => [
                'diskSizeGb' => '',
                'machineType' => ''
        ]
    ],
    'state' => '',
    'uid' => '',
    'updateTime' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/workerPools', [
  'body' => '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/workerPools');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'annotations' => [
    
  ],
  'createTime' => '',
  'deleteTime' => '',
  'displayName' => '',
  'etag' => '',
  'name' => '',
  'privatePoolV1Config' => [
    'networkConfig' => [
        'egressOption' => '',
        'peeredNetwork' => ''
    ],
    'workerConfig' => [
        'diskSizeGb' => '',
        'machineType' => ''
    ]
  ],
  'state' => '',
  'uid' => '',
  'updateTime' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'annotations' => [
    
  ],
  'createTime' => '',
  'deleteTime' => '',
  'displayName' => '',
  'etag' => '',
  'name' => '',
  'privatePoolV1Config' => [
    'networkConfig' => [
        'egressOption' => '',
        'peeredNetwork' => ''
    ],
    'workerConfig' => [
        'diskSizeGb' => '',
        'machineType' => ''
    ]
  ],
  'state' => '',
  'uid' => '',
  'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/workerPools');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/workerPools' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/workerPools' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/:parent/workerPools", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/workerPools"

payload = {
    "annotations": {},
    "createTime": "",
    "deleteTime": "",
    "displayName": "",
    "etag": "",
    "name": "",
    "privatePoolV1Config": {
        "networkConfig": {
            "egressOption": "",
            "peeredNetwork": ""
        },
        "workerConfig": {
            "diskSizeGb": "",
            "machineType": ""
        }
    },
    "state": "",
    "uid": "",
    "updateTime": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/workerPools"

payload <- "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/workerPools")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/:parent/workerPools') do |req|
  req.body = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/workerPools";

    let payload = json!({
        "annotations": json!({}),
        "createTime": "",
        "deleteTime": "",
        "displayName": "",
        "etag": "",
        "name": "",
        "privatePoolV1Config": json!({
            "networkConfig": json!({
                "egressOption": "",
                "peeredNetwork": ""
            }),
            "workerConfig": json!({
                "diskSizeGb": "",
                "machineType": ""
            })
        }),
        "state": "",
        "uid": "",
        "updateTime": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/:parent/workerPools \
  --header 'content-type: application/json' \
  --data '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}'
echo '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}' |  \
  http POST {{baseUrl}}/v1/:parent/workerPools \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "annotations": {},\n  "createTime": "",\n  "deleteTime": "",\n  "displayName": "",\n  "etag": "",\n  "name": "",\n  "privatePoolV1Config": {\n    "networkConfig": {\n      "egressOption": "",\n      "peeredNetwork": ""\n    },\n    "workerConfig": {\n      "diskSizeGb": "",\n      "machineType": ""\n    }\n  },\n  "state": "",\n  "uid": "",\n  "updateTime": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1/:parent/workerPools
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "annotations": [],
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": [
    "networkConfig": [
      "egressOption": "",
      "peeredNetwork": ""
    ],
    "workerConfig": [
      "diskSizeGb": "",
      "machineType": ""
    ]
  ],
  "state": "",
  "uid": "",
  "updateTime": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/workerPools")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Creates a new `BuildTrigger`. This API is experimental. (POST)
{{baseUrl}}/v1/:parent/triggers
QUERY PARAMS

parent
BODY json

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/triggers");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/:parent/triggers" {:content-type :json
                                                                :form-params {:approvalConfig {:approvalRequired false}
                                                                              :autodetect false
                                                                              :build {:approval {:config {}
                                                                                                 :result {:approvalTime ""
                                                                                                          :approverAccount ""
                                                                                                          :comment ""
                                                                                                          :decision ""
                                                                                                          :url ""}
                                                                                                 :state ""}
                                                                                      :artifacts {:images []
                                                                                                  :objects {:location ""
                                                                                                            :paths []
                                                                                                            :timing {:endTime ""
                                                                                                                     :startTime ""}}}
                                                                                      :availableSecrets {:inline [{:envMap {}
                                                                                                                   :kmsKeyName ""}]
                                                                                                         :secretManager [{:env ""
                                                                                                                          :versionName ""}]}
                                                                                      :buildTriggerId ""
                                                                                      :createTime ""
                                                                                      :failureInfo {:detail ""
                                                                                                    :type ""}
                                                                                      :finishTime ""
                                                                                      :id ""
                                                                                      :images []
                                                                                      :logUrl ""
                                                                                      :logsBucket ""
                                                                                      :name ""
                                                                                      :options {:diskSizeGb ""
                                                                                                :dynamicSubstitutions false
                                                                                                :env []
                                                                                                :logStreamingOption ""
                                                                                                :logging ""
                                                                                                :machineType ""
                                                                                                :pool {:name ""}
                                                                                                :requestedVerifyOption ""
                                                                                                :secretEnv []
                                                                                                :sourceProvenanceHash []
                                                                                                :substitutionOption ""
                                                                                                :volumes [{:name ""
                                                                                                           :path ""}]
                                                                                                :workerPool ""}
                                                                                      :projectId ""
                                                                                      :queueTtl ""
                                                                                      :results {:artifactManifest ""
                                                                                                :artifactTiming {}
                                                                                                :buildStepImages []
                                                                                                :buildStepOutputs []
                                                                                                :images [{:digest ""
                                                                                                          :name ""
                                                                                                          :pushTiming {}}]
                                                                                                :numArtifacts ""}
                                                                                      :secrets [{:kmsKeyName ""
                                                                                                 :secretEnv {}}]
                                                                                      :serviceAccount ""
                                                                                      :source {:repoSource {:branchName ""
                                                                                                            :commitSha ""
                                                                                                            :dir ""
                                                                                                            :invertRegex false
                                                                                                            :projectId ""
                                                                                                            :repoName ""
                                                                                                            :substitutions {}
                                                                                                            :tagName ""}
                                                                                               :storageSource {:bucket ""
                                                                                                               :generation ""
                                                                                                               :object ""}
                                                                                               :storageSourceManifest {:bucket ""
                                                                                                                       :generation ""
                                                                                                                       :object ""}}
                                                                                      :sourceProvenance {:fileHashes {}
                                                                                                         :resolvedRepoSource {}
                                                                                                         :resolvedStorageSource {}
                                                                                                         :resolvedStorageSourceManifest {}}
                                                                                      :startTime ""
                                                                                      :status ""
                                                                                      :statusDetail ""
                                                                                      :steps [{:args []
                                                                                               :dir ""
                                                                                               :entrypoint ""
                                                                                               :env []
                                                                                               :id ""
                                                                                               :name ""
                                                                                               :pullTiming {}
                                                                                               :script ""
                                                                                               :secretEnv []
                                                                                               :status ""
                                                                                               :timeout ""
                                                                                               :timing {}
                                                                                               :volumes [{}]
                                                                                               :waitFor []}]
                                                                                      :substitutions {}
                                                                                      :tags []
                                                                                      :timeout ""
                                                                                      :timing {}
                                                                                      :warnings [{:priority ""
                                                                                                  :text ""}]}
                                                                              :createTime ""
                                                                              :description ""
                                                                              :disabled false
                                                                              :filename ""
                                                                              :filter ""
                                                                              :gitFileSource {:path ""
                                                                                              :repoType ""
                                                                                              :revision ""
                                                                                              :uri ""}
                                                                              :github {:enterpriseConfigResourceName ""
                                                                                       :installationId ""
                                                                                       :name ""
                                                                                       :owner ""
                                                                                       :pullRequest {:branch ""
                                                                                                     :commentControl ""
                                                                                                     :invertRegex false}
                                                                                       :push {:branch ""
                                                                                              :invertRegex false
                                                                                              :tag ""}}
                                                                              :id ""
                                                                              :ignoredFiles []
                                                                              :includedFiles []
                                                                              :name ""
                                                                              :pubsubConfig {:serviceAccountEmail ""
                                                                                             :state ""
                                                                                             :subscription ""
                                                                                             :topic ""}
                                                                              :resourceName ""
                                                                              :serviceAccount ""
                                                                              :sourceToBuild {:ref ""
                                                                                              :repoType ""
                                                                                              :uri ""}
                                                                              :substitutions {}
                                                                              :tags []
                                                                              :triggerTemplate {}
                                                                              :webhookConfig {:secret ""
                                                                                              :state ""}}})
require "http/client"

url = "{{baseUrl}}/v1/:parent/triggers"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/triggers"),
    Content = new StringContent("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/triggers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/triggers"

	payload := strings.NewReader("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/:parent/triggers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4022

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/triggers")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/triggers"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/triggers")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/triggers")
  .header("content-type", "application/json")
  .body("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/:parent/triggers');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/triggers',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/triggers';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/triggers',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/triggers")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/triggers',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  approvalConfig: {approvalRequired: false},
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {branch: '', commentControl: '', invertRegex: false},
    push: {branch: '', invertRegex: false, tag: ''}
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {ref: '', repoType: '', uri: ''},
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {secret: '', state: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/triggers',
  headers: {'content-type': 'application/json'},
  body: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/:parent/triggers');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/triggers',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/triggers';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"approvalConfig": @{ @"approvalRequired": @NO },
                              @"autodetect": @NO,
                              @"build": @{ @"approval": @{ @"config": @{  }, @"result": @{ @"approvalTime": @"", @"approverAccount": @"", @"comment": @"", @"decision": @"", @"url": @"" }, @"state": @"" }, @"artifacts": @{ @"images": @[  ], @"objects": @{ @"location": @"", @"paths": @[  ], @"timing": @{ @"endTime": @"", @"startTime": @"" } } }, @"availableSecrets": @{ @"inline": @[ @{ @"envMap": @{  }, @"kmsKeyName": @"" } ], @"secretManager": @[ @{ @"env": @"", @"versionName": @"" } ] }, @"buildTriggerId": @"", @"createTime": @"", @"failureInfo": @{ @"detail": @"", @"type": @"" }, @"finishTime": @"", @"id": @"", @"images": @[  ], @"logUrl": @"", @"logsBucket": @"", @"name": @"", @"options": @{ @"diskSizeGb": @"", @"dynamicSubstitutions": @NO, @"env": @[  ], @"logStreamingOption": @"", @"logging": @"", @"machineType": @"", @"pool": @{ @"name": @"" }, @"requestedVerifyOption": @"", @"secretEnv": @[  ], @"sourceProvenanceHash": @[  ], @"substitutionOption": @"", @"volumes": @[ @{ @"name": @"", @"path": @"" } ], @"workerPool": @"" }, @"projectId": @"", @"queueTtl": @"", @"results": @{ @"artifactManifest": @"", @"artifactTiming": @{  }, @"buildStepImages": @[  ], @"buildStepOutputs": @[  ], @"images": @[ @{ @"digest": @"", @"name": @"", @"pushTiming": @{  } } ], @"numArtifacts": @"" }, @"secrets": @[ @{ @"kmsKeyName": @"", @"secretEnv": @{  } } ], @"serviceAccount": @"", @"source": @{ @"repoSource": @{ @"branchName": @"", @"commitSha": @"", @"dir": @"", @"invertRegex": @NO, @"projectId": @"", @"repoName": @"", @"substitutions": @{  }, @"tagName": @"" }, @"storageSource": @{ @"bucket": @"", @"generation": @"", @"object": @"" }, @"storageSourceManifest": @{ @"bucket": @"", @"generation": @"", @"object": @"" } }, @"sourceProvenance": @{ @"fileHashes": @{  }, @"resolvedRepoSource": @{  }, @"resolvedStorageSource": @{  }, @"resolvedStorageSourceManifest": @{  } }, @"startTime": @"", @"status": @"", @"statusDetail": @"", @"steps": @[ @{ @"args": @[  ], @"dir": @"", @"entrypoint": @"", @"env": @[  ], @"id": @"", @"name": @"", @"pullTiming": @{  }, @"script": @"", @"secretEnv": @[  ], @"status": @"", @"timeout": @"", @"timing": @{  }, @"volumes": @[ @{  } ], @"waitFor": @[  ] } ], @"substitutions": @{  }, @"tags": @[  ], @"timeout": @"", @"timing": @{  }, @"warnings": @[ @{ @"priority": @"", @"text": @"" } ] },
                              @"createTime": @"",
                              @"description": @"",
                              @"disabled": @NO,
                              @"filename": @"",
                              @"filter": @"",
                              @"gitFileSource": @{ @"path": @"", @"repoType": @"", @"revision": @"", @"uri": @"" },
                              @"github": @{ @"enterpriseConfigResourceName": @"", @"installationId": @"", @"name": @"", @"owner": @"", @"pullRequest": @{ @"branch": @"", @"commentControl": @"", @"invertRegex": @NO }, @"push": @{ @"branch": @"", @"invertRegex": @NO, @"tag": @"" } },
                              @"id": @"",
                              @"ignoredFiles": @[  ],
                              @"includedFiles": @[  ],
                              @"name": @"",
                              @"pubsubConfig": @{ @"serviceAccountEmail": @"", @"state": @"", @"subscription": @"", @"topic": @"" },
                              @"resourceName": @"",
                              @"serviceAccount": @"",
                              @"sourceToBuild": @{ @"ref": @"", @"repoType": @"", @"uri": @"" },
                              @"substitutions": @{  },
                              @"tags": @[  ],
                              @"triggerTemplate": @{  },
                              @"webhookConfig": @{ @"secret": @"", @"state": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/triggers"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/triggers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/triggers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'approvalConfig' => [
        'approvalRequired' => null
    ],
    'autodetect' => null,
    'build' => [
        'approval' => [
                'config' => [
                                
                ],
                'result' => [
                                'approvalTime' => '',
                                'approverAccount' => '',
                                'comment' => '',
                                'decision' => '',
                                'url' => ''
                ],
                'state' => ''
        ],
        'artifacts' => [
                'images' => [
                                
                ],
                'objects' => [
                                'location' => '',
                                'paths' => [
                                                                
                                ],
                                'timing' => [
                                                                'endTime' => '',
                                                                'startTime' => ''
                                ]
                ]
        ],
        'availableSecrets' => [
                'inline' => [
                                [
                                                                'envMap' => [
                                                                                                                                
                                                                ],
                                                                'kmsKeyName' => ''
                                ]
                ],
                'secretManager' => [
                                [
                                                                'env' => '',
                                                                'versionName' => ''
                                ]
                ]
        ],
        'buildTriggerId' => '',
        'createTime' => '',
        'failureInfo' => [
                'detail' => '',
                'type' => ''
        ],
        'finishTime' => '',
        'id' => '',
        'images' => [
                
        ],
        'logUrl' => '',
        'logsBucket' => '',
        'name' => '',
        'options' => [
                'diskSizeGb' => '',
                'dynamicSubstitutions' => null,
                'env' => [
                                
                ],
                'logStreamingOption' => '',
                'logging' => '',
                'machineType' => '',
                'pool' => [
                                'name' => ''
                ],
                'requestedVerifyOption' => '',
                'secretEnv' => [
                                
                ],
                'sourceProvenanceHash' => [
                                
                ],
                'substitutionOption' => '',
                'volumes' => [
                                [
                                                                'name' => '',
                                                                'path' => ''
                                ]
                ],
                'workerPool' => ''
        ],
        'projectId' => '',
        'queueTtl' => '',
        'results' => [
                'artifactManifest' => '',
                'artifactTiming' => [
                                
                ],
                'buildStepImages' => [
                                
                ],
                'buildStepOutputs' => [
                                
                ],
                'images' => [
                                [
                                                                'digest' => '',
                                                                'name' => '',
                                                                'pushTiming' => [
                                                                                                                                
                                                                ]
                                ]
                ],
                'numArtifacts' => ''
        ],
        'secrets' => [
                [
                                'kmsKeyName' => '',
                                'secretEnv' => [
                                                                
                                ]
                ]
        ],
        'serviceAccount' => '',
        'source' => [
                'repoSource' => [
                                'branchName' => '',
                                'commitSha' => '',
                                'dir' => '',
                                'invertRegex' => null,
                                'projectId' => '',
                                'repoName' => '',
                                'substitutions' => [
                                                                
                                ],
                                'tagName' => ''
                ],
                'storageSource' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ],
                'storageSourceManifest' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ]
        ],
        'sourceProvenance' => [
                'fileHashes' => [
                                
                ],
                'resolvedRepoSource' => [
                                
                ],
                'resolvedStorageSource' => [
                                
                ],
                'resolvedStorageSourceManifest' => [
                                
                ]
        ],
        'startTime' => '',
        'status' => '',
        'statusDetail' => '',
        'steps' => [
                [
                                'args' => [
                                                                
                                ],
                                'dir' => '',
                                'entrypoint' => '',
                                'env' => [
                                                                
                                ],
                                'id' => '',
                                'name' => '',
                                'pullTiming' => [
                                                                
                                ],
                                'script' => '',
                                'secretEnv' => [
                                                                
                                ],
                                'status' => '',
                                'timeout' => '',
                                'timing' => [
                                                                
                                ],
                                'volumes' => [
                                                                [
                                                                                                                                
                                                                ]
                                ],
                                'waitFor' => [
                                                                
                                ]
                ]
        ],
        'substitutions' => [
                
        ],
        'tags' => [
                
        ],
        'timeout' => '',
        'timing' => [
                
        ],
        'warnings' => [
                [
                                'priority' => '',
                                'text' => ''
                ]
        ]
    ],
    'createTime' => '',
    'description' => '',
    'disabled' => null,
    'filename' => '',
    'filter' => '',
    'gitFileSource' => [
        'path' => '',
        'repoType' => '',
        'revision' => '',
        'uri' => ''
    ],
    'github' => [
        'enterpriseConfigResourceName' => '',
        'installationId' => '',
        'name' => '',
        'owner' => '',
        'pullRequest' => [
                'branch' => '',
                'commentControl' => '',
                'invertRegex' => null
        ],
        'push' => [
                'branch' => '',
                'invertRegex' => null,
                'tag' => ''
        ]
    ],
    'id' => '',
    'ignoredFiles' => [
        
    ],
    'includedFiles' => [
        
    ],
    'name' => '',
    'pubsubConfig' => [
        'serviceAccountEmail' => '',
        'state' => '',
        'subscription' => '',
        'topic' => ''
    ],
    'resourceName' => '',
    'serviceAccount' => '',
    'sourceToBuild' => [
        'ref' => '',
        'repoType' => '',
        'uri' => ''
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'triggerTemplate' => [
        
    ],
    'webhookConfig' => [
        'secret' => '',
        'state' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/triggers', [
  'body' => '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/triggers');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/triggers');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/triggers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/triggers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/:parent/triggers", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/triggers"

payload = {
    "approvalConfig": { "approvalRequired": False },
    "autodetect": False,
    "build": {
        "approval": {
            "config": {},
            "result": {
                "approvalTime": "",
                "approverAccount": "",
                "comment": "",
                "decision": "",
                "url": ""
            },
            "state": ""
        },
        "artifacts": {
            "images": [],
            "objects": {
                "location": "",
                "paths": [],
                "timing": {
                    "endTime": "",
                    "startTime": ""
                }
            }
        },
        "availableSecrets": {
            "inline": [
                {
                    "envMap": {},
                    "kmsKeyName": ""
                }
            ],
            "secretManager": [
                {
                    "env": "",
                    "versionName": ""
                }
            ]
        },
        "buildTriggerId": "",
        "createTime": "",
        "failureInfo": {
            "detail": "",
            "type": ""
        },
        "finishTime": "",
        "id": "",
        "images": [],
        "logUrl": "",
        "logsBucket": "",
        "name": "",
        "options": {
            "diskSizeGb": "",
            "dynamicSubstitutions": False,
            "env": [],
            "logStreamingOption": "",
            "logging": "",
            "machineType": "",
            "pool": { "name": "" },
            "requestedVerifyOption": "",
            "secretEnv": [],
            "sourceProvenanceHash": [],
            "substitutionOption": "",
            "volumes": [
                {
                    "name": "",
                    "path": ""
                }
            ],
            "workerPool": ""
        },
        "projectId": "",
        "queueTtl": "",
        "results": {
            "artifactManifest": "",
            "artifactTiming": {},
            "buildStepImages": [],
            "buildStepOutputs": [],
            "images": [
                {
                    "digest": "",
                    "name": "",
                    "pushTiming": {}
                }
            ],
            "numArtifacts": ""
        },
        "secrets": [
            {
                "kmsKeyName": "",
                "secretEnv": {}
            }
        ],
        "serviceAccount": "",
        "source": {
            "repoSource": {
                "branchName": "",
                "commitSha": "",
                "dir": "",
                "invertRegex": False,
                "projectId": "",
                "repoName": "",
                "substitutions": {},
                "tagName": ""
            },
            "storageSource": {
                "bucket": "",
                "generation": "",
                "object": ""
            },
            "storageSourceManifest": {
                "bucket": "",
                "generation": "",
                "object": ""
            }
        },
        "sourceProvenance": {
            "fileHashes": {},
            "resolvedRepoSource": {},
            "resolvedStorageSource": {},
            "resolvedStorageSourceManifest": {}
        },
        "startTime": "",
        "status": "",
        "statusDetail": "",
        "steps": [
            {
                "args": [],
                "dir": "",
                "entrypoint": "",
                "env": [],
                "id": "",
                "name": "",
                "pullTiming": {},
                "script": "",
                "secretEnv": [],
                "status": "",
                "timeout": "",
                "timing": {},
                "volumes": [{}],
                "waitFor": []
            }
        ],
        "substitutions": {},
        "tags": [],
        "timeout": "",
        "timing": {},
        "warnings": [
            {
                "priority": "",
                "text": ""
            }
        ]
    },
    "createTime": "",
    "description": "",
    "disabled": False,
    "filename": "",
    "filter": "",
    "gitFileSource": {
        "path": "",
        "repoType": "",
        "revision": "",
        "uri": ""
    },
    "github": {
        "enterpriseConfigResourceName": "",
        "installationId": "",
        "name": "",
        "owner": "",
        "pullRequest": {
            "branch": "",
            "commentControl": "",
            "invertRegex": False
        },
        "push": {
            "branch": "",
            "invertRegex": False,
            "tag": ""
        }
    },
    "id": "",
    "ignoredFiles": [],
    "includedFiles": [],
    "name": "",
    "pubsubConfig": {
        "serviceAccountEmail": "",
        "state": "",
        "subscription": "",
        "topic": ""
    },
    "resourceName": "",
    "serviceAccount": "",
    "sourceToBuild": {
        "ref": "",
        "repoType": "",
        "uri": ""
    },
    "substitutions": {},
    "tags": [],
    "triggerTemplate": {},
    "webhookConfig": {
        "secret": "",
        "state": ""
    }
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/triggers"

payload <- "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/triggers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/:parent/triggers') do |req|
  req.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/triggers";

    let payload = json!({
        "approvalConfig": json!({"approvalRequired": false}),
        "autodetect": false,
        "build": json!({
            "approval": json!({
                "config": json!({}),
                "result": json!({
                    "approvalTime": "",
                    "approverAccount": "",
                    "comment": "",
                    "decision": "",
                    "url": ""
                }),
                "state": ""
            }),
            "artifacts": json!({
                "images": (),
                "objects": json!({
                    "location": "",
                    "paths": (),
                    "timing": json!({
                        "endTime": "",
                        "startTime": ""
                    })
                })
            }),
            "availableSecrets": json!({
                "inline": (
                    json!({
                        "envMap": json!({}),
                        "kmsKeyName": ""
                    })
                ),
                "secretManager": (
                    json!({
                        "env": "",
                        "versionName": ""
                    })
                )
            }),
            "buildTriggerId": "",
            "createTime": "",
            "failureInfo": json!({
                "detail": "",
                "type": ""
            }),
            "finishTime": "",
            "id": "",
            "images": (),
            "logUrl": "",
            "logsBucket": "",
            "name": "",
            "options": json!({
                "diskSizeGb": "",
                "dynamicSubstitutions": false,
                "env": (),
                "logStreamingOption": "",
                "logging": "",
                "machineType": "",
                "pool": json!({"name": ""}),
                "requestedVerifyOption": "",
                "secretEnv": (),
                "sourceProvenanceHash": (),
                "substitutionOption": "",
                "volumes": (
                    json!({
                        "name": "",
                        "path": ""
                    })
                ),
                "workerPool": ""
            }),
            "projectId": "",
            "queueTtl": "",
            "results": json!({
                "artifactManifest": "",
                "artifactTiming": json!({}),
                "buildStepImages": (),
                "buildStepOutputs": (),
                "images": (
                    json!({
                        "digest": "",
                        "name": "",
                        "pushTiming": json!({})
                    })
                ),
                "numArtifacts": ""
            }),
            "secrets": (
                json!({
                    "kmsKeyName": "",
                    "secretEnv": json!({})
                })
            ),
            "serviceAccount": "",
            "source": json!({
                "repoSource": json!({
                    "branchName": "",
                    "commitSha": "",
                    "dir": "",
                    "invertRegex": false,
                    "projectId": "",
                    "repoName": "",
                    "substitutions": json!({}),
                    "tagName": ""
                }),
                "storageSource": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                }),
                "storageSourceManifest": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                })
            }),
            "sourceProvenance": json!({
                "fileHashes": json!({}),
                "resolvedRepoSource": json!({}),
                "resolvedStorageSource": json!({}),
                "resolvedStorageSourceManifest": json!({})
            }),
            "startTime": "",
            "status": "",
            "statusDetail": "",
            "steps": (
                json!({
                    "args": (),
                    "dir": "",
                    "entrypoint": "",
                    "env": (),
                    "id": "",
                    "name": "",
                    "pullTiming": json!({}),
                    "script": "",
                    "secretEnv": (),
                    "status": "",
                    "timeout": "",
                    "timing": json!({}),
                    "volumes": (json!({})),
                    "waitFor": ()
                })
            ),
            "substitutions": json!({}),
            "tags": (),
            "timeout": "",
            "timing": json!({}),
            "warnings": (
                json!({
                    "priority": "",
                    "text": ""
                })
            )
        }),
        "createTime": "",
        "description": "",
        "disabled": false,
        "filename": "",
        "filter": "",
        "gitFileSource": json!({
            "path": "",
            "repoType": "",
            "revision": "",
            "uri": ""
        }),
        "github": json!({
            "enterpriseConfigResourceName": "",
            "installationId": "",
            "name": "",
            "owner": "",
            "pullRequest": json!({
                "branch": "",
                "commentControl": "",
                "invertRegex": false
            }),
            "push": json!({
                "branch": "",
                "invertRegex": false,
                "tag": ""
            })
        }),
        "id": "",
        "ignoredFiles": (),
        "includedFiles": (),
        "name": "",
        "pubsubConfig": json!({
            "serviceAccountEmail": "",
            "state": "",
            "subscription": "",
            "topic": ""
        }),
        "resourceName": "",
        "serviceAccount": "",
        "sourceToBuild": json!({
            "ref": "",
            "repoType": "",
            "uri": ""
        }),
        "substitutions": json!({}),
        "tags": (),
        "triggerTemplate": json!({}),
        "webhookConfig": json!({
            "secret": "",
            "state": ""
        })
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/:parent/triggers \
  --header 'content-type: application/json' \
  --data '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
echo '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}' |  \
  http POST {{baseUrl}}/v1/:parent/triggers \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/:parent/triggers
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "approvalConfig": ["approvalRequired": false],
  "autodetect": false,
  "build": [
    "approval": [
      "config": [],
      "result": [
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      ],
      "state": ""
    ],
    "artifacts": [
      "images": [],
      "objects": [
        "location": "",
        "paths": [],
        "timing": [
          "endTime": "",
          "startTime": ""
        ]
      ]
    ],
    "availableSecrets": [
      "inline": [
        [
          "envMap": [],
          "kmsKeyName": ""
        ]
      ],
      "secretManager": [
        [
          "env": "",
          "versionName": ""
        ]
      ]
    ],
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": [
      "detail": "",
      "type": ""
    ],
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": [
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": ["name": ""],
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        [
          "name": "",
          "path": ""
        ]
      ],
      "workerPool": ""
    ],
    "projectId": "",
    "queueTtl": "",
    "results": [
      "artifactManifest": "",
      "artifactTiming": [],
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        [
          "digest": "",
          "name": "",
          "pushTiming": []
        ]
      ],
      "numArtifacts": ""
    ],
    "secrets": [
      [
        "kmsKeyName": "",
        "secretEnv": []
      ]
    ],
    "serviceAccount": "",
    "source": [
      "repoSource": [
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": [],
        "tagName": ""
      ],
      "storageSource": [
        "bucket": "",
        "generation": "",
        "object": ""
      ],
      "storageSourceManifest": [
        "bucket": "",
        "generation": "",
        "object": ""
      ]
    ],
    "sourceProvenance": [
      "fileHashes": [],
      "resolvedRepoSource": [],
      "resolvedStorageSource": [],
      "resolvedStorageSourceManifest": []
    ],
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      [
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": [],
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": [],
        "volumes": [[]],
        "waitFor": []
      ]
    ],
    "substitutions": [],
    "tags": [],
    "timeout": "",
    "timing": [],
    "warnings": [
      [
        "priority": "",
        "text": ""
      ]
    ]
  ],
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": [
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  ],
  "github": [
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": [
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    ],
    "push": [
      "branch": "",
      "invertRegex": false,
      "tag": ""
    ]
  ],
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": [
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  ],
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": [
    "ref": "",
    "repoType": "",
    "uri": ""
  ],
  "substitutions": [],
  "tags": [],
  "triggerTemplate": [],
  "webhookConfig": [
    "secret": "",
    "state": ""
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/triggers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Creates a new `BuildTrigger`. This API is experimental.
{{baseUrl}}/v1/projects/:projectId/triggers
QUERY PARAMS

projectId
BODY json

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/triggers");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/projects/:projectId/triggers" {:content-type :json
                                                                            :form-params {:approvalConfig {:approvalRequired false}
                                                                                          :autodetect false
                                                                                          :build {:approval {:config {}
                                                                                                             :result {:approvalTime ""
                                                                                                                      :approverAccount ""
                                                                                                                      :comment ""
                                                                                                                      :decision ""
                                                                                                                      :url ""}
                                                                                                             :state ""}
                                                                                                  :artifacts {:images []
                                                                                                              :objects {:location ""
                                                                                                                        :paths []
                                                                                                                        :timing {:endTime ""
                                                                                                                                 :startTime ""}}}
                                                                                                  :availableSecrets {:inline [{:envMap {}
                                                                                                                               :kmsKeyName ""}]
                                                                                                                     :secretManager [{:env ""
                                                                                                                                      :versionName ""}]}
                                                                                                  :buildTriggerId ""
                                                                                                  :createTime ""
                                                                                                  :failureInfo {:detail ""
                                                                                                                :type ""}
                                                                                                  :finishTime ""
                                                                                                  :id ""
                                                                                                  :images []
                                                                                                  :logUrl ""
                                                                                                  :logsBucket ""
                                                                                                  :name ""
                                                                                                  :options {:diskSizeGb ""
                                                                                                            :dynamicSubstitutions false
                                                                                                            :env []
                                                                                                            :logStreamingOption ""
                                                                                                            :logging ""
                                                                                                            :machineType ""
                                                                                                            :pool {:name ""}
                                                                                                            :requestedVerifyOption ""
                                                                                                            :secretEnv []
                                                                                                            :sourceProvenanceHash []
                                                                                                            :substitutionOption ""
                                                                                                            :volumes [{:name ""
                                                                                                                       :path ""}]
                                                                                                            :workerPool ""}
                                                                                                  :projectId ""
                                                                                                  :queueTtl ""
                                                                                                  :results {:artifactManifest ""
                                                                                                            :artifactTiming {}
                                                                                                            :buildStepImages []
                                                                                                            :buildStepOutputs []
                                                                                                            :images [{:digest ""
                                                                                                                      :name ""
                                                                                                                      :pushTiming {}}]
                                                                                                            :numArtifacts ""}
                                                                                                  :secrets [{:kmsKeyName ""
                                                                                                             :secretEnv {}}]
                                                                                                  :serviceAccount ""
                                                                                                  :source {:repoSource {:branchName ""
                                                                                                                        :commitSha ""
                                                                                                                        :dir ""
                                                                                                                        :invertRegex false
                                                                                                                        :projectId ""
                                                                                                                        :repoName ""
                                                                                                                        :substitutions {}
                                                                                                                        :tagName ""}
                                                                                                           :storageSource {:bucket ""
                                                                                                                           :generation ""
                                                                                                                           :object ""}
                                                                                                           :storageSourceManifest {:bucket ""
                                                                                                                                   :generation ""
                                                                                                                                   :object ""}}
                                                                                                  :sourceProvenance {:fileHashes {}
                                                                                                                     :resolvedRepoSource {}
                                                                                                                     :resolvedStorageSource {}
                                                                                                                     :resolvedStorageSourceManifest {}}
                                                                                                  :startTime ""
                                                                                                  :status ""
                                                                                                  :statusDetail ""
                                                                                                  :steps [{:args []
                                                                                                           :dir ""
                                                                                                           :entrypoint ""
                                                                                                           :env []
                                                                                                           :id ""
                                                                                                           :name ""
                                                                                                           :pullTiming {}
                                                                                                           :script ""
                                                                                                           :secretEnv []
                                                                                                           :status ""
                                                                                                           :timeout ""
                                                                                                           :timing {}
                                                                                                           :volumes [{}]
                                                                                                           :waitFor []}]
                                                                                                  :substitutions {}
                                                                                                  :tags []
                                                                                                  :timeout ""
                                                                                                  :timing {}
                                                                                                  :warnings [{:priority ""
                                                                                                              :text ""}]}
                                                                                          :createTime ""
                                                                                          :description ""
                                                                                          :disabled false
                                                                                          :filename ""
                                                                                          :filter ""
                                                                                          :gitFileSource {:path ""
                                                                                                          :repoType ""
                                                                                                          :revision ""
                                                                                                          :uri ""}
                                                                                          :github {:enterpriseConfigResourceName ""
                                                                                                   :installationId ""
                                                                                                   :name ""
                                                                                                   :owner ""
                                                                                                   :pullRequest {:branch ""
                                                                                                                 :commentControl ""
                                                                                                                 :invertRegex false}
                                                                                                   :push {:branch ""
                                                                                                          :invertRegex false
                                                                                                          :tag ""}}
                                                                                          :id ""
                                                                                          :ignoredFiles []
                                                                                          :includedFiles []
                                                                                          :name ""
                                                                                          :pubsubConfig {:serviceAccountEmail ""
                                                                                                         :state ""
                                                                                                         :subscription ""
                                                                                                         :topic ""}
                                                                                          :resourceName ""
                                                                                          :serviceAccount ""
                                                                                          :sourceToBuild {:ref ""
                                                                                                          :repoType ""
                                                                                                          :uri ""}
                                                                                          :substitutions {}
                                                                                          :tags []
                                                                                          :triggerTemplate {}
                                                                                          :webhookConfig {:secret ""
                                                                                                          :state ""}}})
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/triggers"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/triggers"),
    Content = new StringContent("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/triggers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/triggers"

	payload := strings.NewReader("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/projects/:projectId/triggers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4022

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/projects/:projectId/triggers")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/triggers"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/projects/:projectId/triggers")
  .header("content-type", "application/json")
  .body("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/projects/:projectId/triggers');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/triggers';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/triggers',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/triggers',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  approvalConfig: {approvalRequired: false},
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {branch: '', commentControl: '', invertRegex: false},
    push: {branch: '', invertRegex: false, tag: ''}
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {ref: '', repoType: '', uri: ''},
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {secret: '', state: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers',
  headers: {'content-type': 'application/json'},
  body: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/projects/:projectId/triggers');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/triggers';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"approvalConfig": @{ @"approvalRequired": @NO },
                              @"autodetect": @NO,
                              @"build": @{ @"approval": @{ @"config": @{  }, @"result": @{ @"approvalTime": @"", @"approverAccount": @"", @"comment": @"", @"decision": @"", @"url": @"" }, @"state": @"" }, @"artifacts": @{ @"images": @[  ], @"objects": @{ @"location": @"", @"paths": @[  ], @"timing": @{ @"endTime": @"", @"startTime": @"" } } }, @"availableSecrets": @{ @"inline": @[ @{ @"envMap": @{  }, @"kmsKeyName": @"" } ], @"secretManager": @[ @{ @"env": @"", @"versionName": @"" } ] }, @"buildTriggerId": @"", @"createTime": @"", @"failureInfo": @{ @"detail": @"", @"type": @"" }, @"finishTime": @"", @"id": @"", @"images": @[  ], @"logUrl": @"", @"logsBucket": @"", @"name": @"", @"options": @{ @"diskSizeGb": @"", @"dynamicSubstitutions": @NO, @"env": @[  ], @"logStreamingOption": @"", @"logging": @"", @"machineType": @"", @"pool": @{ @"name": @"" }, @"requestedVerifyOption": @"", @"secretEnv": @[  ], @"sourceProvenanceHash": @[  ], @"substitutionOption": @"", @"volumes": @[ @{ @"name": @"", @"path": @"" } ], @"workerPool": @"" }, @"projectId": @"", @"queueTtl": @"", @"results": @{ @"artifactManifest": @"", @"artifactTiming": @{  }, @"buildStepImages": @[  ], @"buildStepOutputs": @[  ], @"images": @[ @{ @"digest": @"", @"name": @"", @"pushTiming": @{  } } ], @"numArtifacts": @"" }, @"secrets": @[ @{ @"kmsKeyName": @"", @"secretEnv": @{  } } ], @"serviceAccount": @"", @"source": @{ @"repoSource": @{ @"branchName": @"", @"commitSha": @"", @"dir": @"", @"invertRegex": @NO, @"projectId": @"", @"repoName": @"", @"substitutions": @{  }, @"tagName": @"" }, @"storageSource": @{ @"bucket": @"", @"generation": @"", @"object": @"" }, @"storageSourceManifest": @{ @"bucket": @"", @"generation": @"", @"object": @"" } }, @"sourceProvenance": @{ @"fileHashes": @{  }, @"resolvedRepoSource": @{  }, @"resolvedStorageSource": @{  }, @"resolvedStorageSourceManifest": @{  } }, @"startTime": @"", @"status": @"", @"statusDetail": @"", @"steps": @[ @{ @"args": @[  ], @"dir": @"", @"entrypoint": @"", @"env": @[  ], @"id": @"", @"name": @"", @"pullTiming": @{  }, @"script": @"", @"secretEnv": @[  ], @"status": @"", @"timeout": @"", @"timing": @{  }, @"volumes": @[ @{  } ], @"waitFor": @[  ] } ], @"substitutions": @{  }, @"tags": @[  ], @"timeout": @"", @"timing": @{  }, @"warnings": @[ @{ @"priority": @"", @"text": @"" } ] },
                              @"createTime": @"",
                              @"description": @"",
                              @"disabled": @NO,
                              @"filename": @"",
                              @"filter": @"",
                              @"gitFileSource": @{ @"path": @"", @"repoType": @"", @"revision": @"", @"uri": @"" },
                              @"github": @{ @"enterpriseConfigResourceName": @"", @"installationId": @"", @"name": @"", @"owner": @"", @"pullRequest": @{ @"branch": @"", @"commentControl": @"", @"invertRegex": @NO }, @"push": @{ @"branch": @"", @"invertRegex": @NO, @"tag": @"" } },
                              @"id": @"",
                              @"ignoredFiles": @[  ],
                              @"includedFiles": @[  ],
                              @"name": @"",
                              @"pubsubConfig": @{ @"serviceAccountEmail": @"", @"state": @"", @"subscription": @"", @"topic": @"" },
                              @"resourceName": @"",
                              @"serviceAccount": @"",
                              @"sourceToBuild": @{ @"ref": @"", @"repoType": @"", @"uri": @"" },
                              @"substitutions": @{  },
                              @"tags": @[  ],
                              @"triggerTemplate": @{  },
                              @"webhookConfig": @{ @"secret": @"", @"state": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/triggers"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/triggers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/triggers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'approvalConfig' => [
        'approvalRequired' => null
    ],
    'autodetect' => null,
    'build' => [
        'approval' => [
                'config' => [
                                
                ],
                'result' => [
                                'approvalTime' => '',
                                'approverAccount' => '',
                                'comment' => '',
                                'decision' => '',
                                'url' => ''
                ],
                'state' => ''
        ],
        'artifacts' => [
                'images' => [
                                
                ],
                'objects' => [
                                'location' => '',
                                'paths' => [
                                                                
                                ],
                                'timing' => [
                                                                'endTime' => '',
                                                                'startTime' => ''
                                ]
                ]
        ],
        'availableSecrets' => [
                'inline' => [
                                [
                                                                'envMap' => [
                                                                                                                                
                                                                ],
                                                                'kmsKeyName' => ''
                                ]
                ],
                'secretManager' => [
                                [
                                                                'env' => '',
                                                                'versionName' => ''
                                ]
                ]
        ],
        'buildTriggerId' => '',
        'createTime' => '',
        'failureInfo' => [
                'detail' => '',
                'type' => ''
        ],
        'finishTime' => '',
        'id' => '',
        'images' => [
                
        ],
        'logUrl' => '',
        'logsBucket' => '',
        'name' => '',
        'options' => [
                'diskSizeGb' => '',
                'dynamicSubstitutions' => null,
                'env' => [
                                
                ],
                'logStreamingOption' => '',
                'logging' => '',
                'machineType' => '',
                'pool' => [
                                'name' => ''
                ],
                'requestedVerifyOption' => '',
                'secretEnv' => [
                                
                ],
                'sourceProvenanceHash' => [
                                
                ],
                'substitutionOption' => '',
                'volumes' => [
                                [
                                                                'name' => '',
                                                                'path' => ''
                                ]
                ],
                'workerPool' => ''
        ],
        'projectId' => '',
        'queueTtl' => '',
        'results' => [
                'artifactManifest' => '',
                'artifactTiming' => [
                                
                ],
                'buildStepImages' => [
                                
                ],
                'buildStepOutputs' => [
                                
                ],
                'images' => [
                                [
                                                                'digest' => '',
                                                                'name' => '',
                                                                'pushTiming' => [
                                                                                                                                
                                                                ]
                                ]
                ],
                'numArtifacts' => ''
        ],
        'secrets' => [
                [
                                'kmsKeyName' => '',
                                'secretEnv' => [
                                                                
                                ]
                ]
        ],
        'serviceAccount' => '',
        'source' => [
                'repoSource' => [
                                'branchName' => '',
                                'commitSha' => '',
                                'dir' => '',
                                'invertRegex' => null,
                                'projectId' => '',
                                'repoName' => '',
                                'substitutions' => [
                                                                
                                ],
                                'tagName' => ''
                ],
                'storageSource' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ],
                'storageSourceManifest' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ]
        ],
        'sourceProvenance' => [
                'fileHashes' => [
                                
                ],
                'resolvedRepoSource' => [
                                
                ],
                'resolvedStorageSource' => [
                                
                ],
                'resolvedStorageSourceManifest' => [
                                
                ]
        ],
        'startTime' => '',
        'status' => '',
        'statusDetail' => '',
        'steps' => [
                [
                                'args' => [
                                                                
                                ],
                                'dir' => '',
                                'entrypoint' => '',
                                'env' => [
                                                                
                                ],
                                'id' => '',
                                'name' => '',
                                'pullTiming' => [
                                                                
                                ],
                                'script' => '',
                                'secretEnv' => [
                                                                
                                ],
                                'status' => '',
                                'timeout' => '',
                                'timing' => [
                                                                
                                ],
                                'volumes' => [
                                                                [
                                                                                                                                
                                                                ]
                                ],
                                'waitFor' => [
                                                                
                                ]
                ]
        ],
        'substitutions' => [
                
        ],
        'tags' => [
                
        ],
        'timeout' => '',
        'timing' => [
                
        ],
        'warnings' => [
                [
                                'priority' => '',
                                'text' => ''
                ]
        ]
    ],
    'createTime' => '',
    'description' => '',
    'disabled' => null,
    'filename' => '',
    'filter' => '',
    'gitFileSource' => [
        'path' => '',
        'repoType' => '',
        'revision' => '',
        'uri' => ''
    ],
    'github' => [
        'enterpriseConfigResourceName' => '',
        'installationId' => '',
        'name' => '',
        'owner' => '',
        'pullRequest' => [
                'branch' => '',
                'commentControl' => '',
                'invertRegex' => null
        ],
        'push' => [
                'branch' => '',
                'invertRegex' => null,
                'tag' => ''
        ]
    ],
    'id' => '',
    'ignoredFiles' => [
        
    ],
    'includedFiles' => [
        
    ],
    'name' => '',
    'pubsubConfig' => [
        'serviceAccountEmail' => '',
        'state' => '',
        'subscription' => '',
        'topic' => ''
    ],
    'resourceName' => '',
    'serviceAccount' => '',
    'sourceToBuild' => [
        'ref' => '',
        'repoType' => '',
        'uri' => ''
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'triggerTemplate' => [
        
    ],
    'webhookConfig' => [
        'secret' => '',
        'state' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/projects/:projectId/triggers', [
  'body' => '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/triggers');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/projects/:projectId/triggers');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/triggers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/triggers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/projects/:projectId/triggers", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/triggers"

payload = {
    "approvalConfig": { "approvalRequired": False },
    "autodetect": False,
    "build": {
        "approval": {
            "config": {},
            "result": {
                "approvalTime": "",
                "approverAccount": "",
                "comment": "",
                "decision": "",
                "url": ""
            },
            "state": ""
        },
        "artifacts": {
            "images": [],
            "objects": {
                "location": "",
                "paths": [],
                "timing": {
                    "endTime": "",
                    "startTime": ""
                }
            }
        },
        "availableSecrets": {
            "inline": [
                {
                    "envMap": {},
                    "kmsKeyName": ""
                }
            ],
            "secretManager": [
                {
                    "env": "",
                    "versionName": ""
                }
            ]
        },
        "buildTriggerId": "",
        "createTime": "",
        "failureInfo": {
            "detail": "",
            "type": ""
        },
        "finishTime": "",
        "id": "",
        "images": [],
        "logUrl": "",
        "logsBucket": "",
        "name": "",
        "options": {
            "diskSizeGb": "",
            "dynamicSubstitutions": False,
            "env": [],
            "logStreamingOption": "",
            "logging": "",
            "machineType": "",
            "pool": { "name": "" },
            "requestedVerifyOption": "",
            "secretEnv": [],
            "sourceProvenanceHash": [],
            "substitutionOption": "",
            "volumes": [
                {
                    "name": "",
                    "path": ""
                }
            ],
            "workerPool": ""
        },
        "projectId": "",
        "queueTtl": "",
        "results": {
            "artifactManifest": "",
            "artifactTiming": {},
            "buildStepImages": [],
            "buildStepOutputs": [],
            "images": [
                {
                    "digest": "",
                    "name": "",
                    "pushTiming": {}
                }
            ],
            "numArtifacts": ""
        },
        "secrets": [
            {
                "kmsKeyName": "",
                "secretEnv": {}
            }
        ],
        "serviceAccount": "",
        "source": {
            "repoSource": {
                "branchName": "",
                "commitSha": "",
                "dir": "",
                "invertRegex": False,
                "projectId": "",
                "repoName": "",
                "substitutions": {},
                "tagName": ""
            },
            "storageSource": {
                "bucket": "",
                "generation": "",
                "object": ""
            },
            "storageSourceManifest": {
                "bucket": "",
                "generation": "",
                "object": ""
            }
        },
        "sourceProvenance": {
            "fileHashes": {},
            "resolvedRepoSource": {},
            "resolvedStorageSource": {},
            "resolvedStorageSourceManifest": {}
        },
        "startTime": "",
        "status": "",
        "statusDetail": "",
        "steps": [
            {
                "args": [],
                "dir": "",
                "entrypoint": "",
                "env": [],
                "id": "",
                "name": "",
                "pullTiming": {},
                "script": "",
                "secretEnv": [],
                "status": "",
                "timeout": "",
                "timing": {},
                "volumes": [{}],
                "waitFor": []
            }
        ],
        "substitutions": {},
        "tags": [],
        "timeout": "",
        "timing": {},
        "warnings": [
            {
                "priority": "",
                "text": ""
            }
        ]
    },
    "createTime": "",
    "description": "",
    "disabled": False,
    "filename": "",
    "filter": "",
    "gitFileSource": {
        "path": "",
        "repoType": "",
        "revision": "",
        "uri": ""
    },
    "github": {
        "enterpriseConfigResourceName": "",
        "installationId": "",
        "name": "",
        "owner": "",
        "pullRequest": {
            "branch": "",
            "commentControl": "",
            "invertRegex": False
        },
        "push": {
            "branch": "",
            "invertRegex": False,
            "tag": ""
        }
    },
    "id": "",
    "ignoredFiles": [],
    "includedFiles": [],
    "name": "",
    "pubsubConfig": {
        "serviceAccountEmail": "",
        "state": "",
        "subscription": "",
        "topic": ""
    },
    "resourceName": "",
    "serviceAccount": "",
    "sourceToBuild": {
        "ref": "",
        "repoType": "",
        "uri": ""
    },
    "substitutions": {},
    "tags": [],
    "triggerTemplate": {},
    "webhookConfig": {
        "secret": "",
        "state": ""
    }
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/triggers"

payload <- "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/triggers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/projects/:projectId/triggers') do |req|
  req.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/triggers";

    let payload = json!({
        "approvalConfig": json!({"approvalRequired": false}),
        "autodetect": false,
        "build": json!({
            "approval": json!({
                "config": json!({}),
                "result": json!({
                    "approvalTime": "",
                    "approverAccount": "",
                    "comment": "",
                    "decision": "",
                    "url": ""
                }),
                "state": ""
            }),
            "artifacts": json!({
                "images": (),
                "objects": json!({
                    "location": "",
                    "paths": (),
                    "timing": json!({
                        "endTime": "",
                        "startTime": ""
                    })
                })
            }),
            "availableSecrets": json!({
                "inline": (
                    json!({
                        "envMap": json!({}),
                        "kmsKeyName": ""
                    })
                ),
                "secretManager": (
                    json!({
                        "env": "",
                        "versionName": ""
                    })
                )
            }),
            "buildTriggerId": "",
            "createTime": "",
            "failureInfo": json!({
                "detail": "",
                "type": ""
            }),
            "finishTime": "",
            "id": "",
            "images": (),
            "logUrl": "",
            "logsBucket": "",
            "name": "",
            "options": json!({
                "diskSizeGb": "",
                "dynamicSubstitutions": false,
                "env": (),
                "logStreamingOption": "",
                "logging": "",
                "machineType": "",
                "pool": json!({"name": ""}),
                "requestedVerifyOption": "",
                "secretEnv": (),
                "sourceProvenanceHash": (),
                "substitutionOption": "",
                "volumes": (
                    json!({
                        "name": "",
                        "path": ""
                    })
                ),
                "workerPool": ""
            }),
            "projectId": "",
            "queueTtl": "",
            "results": json!({
                "artifactManifest": "",
                "artifactTiming": json!({}),
                "buildStepImages": (),
                "buildStepOutputs": (),
                "images": (
                    json!({
                        "digest": "",
                        "name": "",
                        "pushTiming": json!({})
                    })
                ),
                "numArtifacts": ""
            }),
            "secrets": (
                json!({
                    "kmsKeyName": "",
                    "secretEnv": json!({})
                })
            ),
            "serviceAccount": "",
            "source": json!({
                "repoSource": json!({
                    "branchName": "",
                    "commitSha": "",
                    "dir": "",
                    "invertRegex": false,
                    "projectId": "",
                    "repoName": "",
                    "substitutions": json!({}),
                    "tagName": ""
                }),
                "storageSource": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                }),
                "storageSourceManifest": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                })
            }),
            "sourceProvenance": json!({
                "fileHashes": json!({}),
                "resolvedRepoSource": json!({}),
                "resolvedStorageSource": json!({}),
                "resolvedStorageSourceManifest": json!({})
            }),
            "startTime": "",
            "status": "",
            "statusDetail": "",
            "steps": (
                json!({
                    "args": (),
                    "dir": "",
                    "entrypoint": "",
                    "env": (),
                    "id": "",
                    "name": "",
                    "pullTiming": json!({}),
                    "script": "",
                    "secretEnv": (),
                    "status": "",
                    "timeout": "",
                    "timing": json!({}),
                    "volumes": (json!({})),
                    "waitFor": ()
                })
            ),
            "substitutions": json!({}),
            "tags": (),
            "timeout": "",
            "timing": json!({}),
            "warnings": (
                json!({
                    "priority": "",
                    "text": ""
                })
            )
        }),
        "createTime": "",
        "description": "",
        "disabled": false,
        "filename": "",
        "filter": "",
        "gitFileSource": json!({
            "path": "",
            "repoType": "",
            "revision": "",
            "uri": ""
        }),
        "github": json!({
            "enterpriseConfigResourceName": "",
            "installationId": "",
            "name": "",
            "owner": "",
            "pullRequest": json!({
                "branch": "",
                "commentControl": "",
                "invertRegex": false
            }),
            "push": json!({
                "branch": "",
                "invertRegex": false,
                "tag": ""
            })
        }),
        "id": "",
        "ignoredFiles": (),
        "includedFiles": (),
        "name": "",
        "pubsubConfig": json!({
            "serviceAccountEmail": "",
            "state": "",
            "subscription": "",
            "topic": ""
        }),
        "resourceName": "",
        "serviceAccount": "",
        "sourceToBuild": json!({
            "ref": "",
            "repoType": "",
            "uri": ""
        }),
        "substitutions": json!({}),
        "tags": (),
        "triggerTemplate": json!({}),
        "webhookConfig": json!({
            "secret": "",
            "state": ""
        })
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/projects/:projectId/triggers \
  --header 'content-type: application/json' \
  --data '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
echo '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}' |  \
  http POST {{baseUrl}}/v1/projects/:projectId/triggers \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/triggers
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "approvalConfig": ["approvalRequired": false],
  "autodetect": false,
  "build": [
    "approval": [
      "config": [],
      "result": [
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      ],
      "state": ""
    ],
    "artifacts": [
      "images": [],
      "objects": [
        "location": "",
        "paths": [],
        "timing": [
          "endTime": "",
          "startTime": ""
        ]
      ]
    ],
    "availableSecrets": [
      "inline": [
        [
          "envMap": [],
          "kmsKeyName": ""
        ]
      ],
      "secretManager": [
        [
          "env": "",
          "versionName": ""
        ]
      ]
    ],
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": [
      "detail": "",
      "type": ""
    ],
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": [
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": ["name": ""],
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        [
          "name": "",
          "path": ""
        ]
      ],
      "workerPool": ""
    ],
    "projectId": "",
    "queueTtl": "",
    "results": [
      "artifactManifest": "",
      "artifactTiming": [],
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        [
          "digest": "",
          "name": "",
          "pushTiming": []
        ]
      ],
      "numArtifacts": ""
    ],
    "secrets": [
      [
        "kmsKeyName": "",
        "secretEnv": []
      ]
    ],
    "serviceAccount": "",
    "source": [
      "repoSource": [
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": [],
        "tagName": ""
      ],
      "storageSource": [
        "bucket": "",
        "generation": "",
        "object": ""
      ],
      "storageSourceManifest": [
        "bucket": "",
        "generation": "",
        "object": ""
      ]
    ],
    "sourceProvenance": [
      "fileHashes": [],
      "resolvedRepoSource": [],
      "resolvedStorageSource": [],
      "resolvedStorageSourceManifest": []
    ],
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      [
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": [],
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": [],
        "volumes": [[]],
        "waitFor": []
      ]
    ],
    "substitutions": [],
    "tags": [],
    "timeout": "",
    "timing": [],
    "warnings": [
      [
        "priority": "",
        "text": ""
      ]
    ]
  ],
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": [
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  ],
  "github": [
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": [
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    ],
    "push": [
      "branch": "",
      "invertRegex": false,
      "tag": ""
    ]
  ],
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": [
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  ],
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": [
    "ref": "",
    "repoType": "",
    "uri": ""
  ],
  "substitutions": [],
  "tags": [],
  "triggerTemplate": [],
  "webhookConfig": [
    "secret": "",
    "state": ""
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/triggers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
DELETE Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.
{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
QUERY PARAMS

projectId
triggerId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/v1/projects/:projectId/triggers/:triggerId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/triggers/:triggerId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/v1/projects/:projectId/triggers/:triggerId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/v1/projects/:projectId/triggers/:triggerId') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
http DELETE {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
DELETE Deletes a `WorkerPool`.
{{baseUrl}}/v1/:name
QUERY PARAMS

name
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/v1/:name")
require "http/client"

url = "{{baseUrl}}/v1/:name"

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:name"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/v1/:name HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:name"))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:name")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/v1/:name');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:name',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/:name")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:name',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/v1/:name');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:name" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:name",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:name');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/v1/:name")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:name"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:name"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/v1/:name') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:name";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/v1/:name
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET List all GitHubEnterpriseConfigs for a given project. This API is experimental.
{{baseUrl}}/v1/:parent/githubEnterpriseConfigs
QUERY PARAMS

parent
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
require "http/client"

url = "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/:parent/githubEnterpriseConfigs HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/githubEnterpriseConfigs',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/githubEnterpriseConfigs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/githubEnterpriseConfigs' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/:parent/githubEnterpriseConfigs")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/:parent/githubEnterpriseConfigs') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/:parent/githubEnterpriseConfigs
http GET {{baseUrl}}/v1/:parent/githubEnterpriseConfigs
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/:parent/githubEnterpriseConfigs
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/githubEnterpriseConfigs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Lists `WorkerPool`s.
{{baseUrl}}/v1/:parent/workerPools
QUERY PARAMS

parent
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/workerPools");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/:parent/workerPools")
require "http/client"

url = "{{baseUrl}}/v1/:parent/workerPools"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/workerPools"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/workerPools");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/workerPools"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/:parent/workerPools HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/workerPools")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/workerPools"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/workerPools")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/workerPools")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/:parent/workerPools');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/workerPools'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/workerPools';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/workerPools',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/workerPools")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/workerPools',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/workerPools'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/:parent/workerPools');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/workerPools'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/workerPools';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/workerPools"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/workerPools" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/workerPools",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/workerPools');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/workerPools');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/workerPools');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/workerPools' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/workerPools' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/:parent/workerPools")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/workerPools"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/workerPools"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/workerPools")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/:parent/workerPools') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/workerPools";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/:parent/workerPools
http GET {{baseUrl}}/v1/:parent/workerPools
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/:parent/workerPools
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/workerPools")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Lists existing `BuildTrigger`s. This API is experimental. (GET)
{{baseUrl}}/v1/:parent/triggers
QUERY PARAMS

parent
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/triggers");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/:parent/triggers")
require "http/client"

url = "{{baseUrl}}/v1/:parent/triggers"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/triggers"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/triggers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/triggers"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/:parent/triggers HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/triggers")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/triggers"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/triggers")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/triggers")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/:parent/triggers');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/triggers'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/triggers';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/triggers',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/triggers")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/triggers',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/triggers'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/:parent/triggers');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/triggers'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/triggers';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/triggers"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/triggers" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/triggers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/triggers');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/triggers');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/triggers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/triggers' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/triggers' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/:parent/triggers")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/triggers"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/triggers"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/triggers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/:parent/triggers') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/triggers";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/:parent/triggers
http GET {{baseUrl}}/v1/:parent/triggers
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/:parent/triggers
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/triggers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Lists existing `BuildTrigger`s. This API is experimental.
{{baseUrl}}/v1/projects/:projectId/triggers
QUERY PARAMS

projectId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/triggers");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/projects/:projectId/triggers")
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/triggers"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/triggers"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/triggers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/triggers"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/projects/:projectId/triggers HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/projects/:projectId/triggers")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/triggers"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/projects/:projectId/triggers")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/projects/:projectId/triggers');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/triggers';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/triggers',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/triggers',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/projects/:projectId/triggers');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/triggers';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/triggers"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/triggers" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/triggers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/projects/:projectId/triggers');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/triggers');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/projects/:projectId/triggers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/triggers' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/triggers' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/projects/:projectId/triggers")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/triggers"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/triggers"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/triggers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/projects/:projectId/triggers') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/triggers";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/projects/:projectId/triggers
http GET {{baseUrl}}/v1/projects/:projectId/triggers
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/triggers
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/triggers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. (GET)
{{baseUrl}}/v1/:parent/builds
QUERY PARAMS

parent
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/builds");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/:parent/builds")
require "http/client"

url = "{{baseUrl}}/v1/:parent/builds"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/builds"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/builds");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/builds"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/:parent/builds HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/builds")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/builds"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/builds")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/builds")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/:parent/builds');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/builds'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/builds';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/builds',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/builds")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/builds',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/builds'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/:parent/builds');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/builds'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/builds';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/builds"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/builds" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/builds",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/builds');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/builds');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/builds');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/builds' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/builds' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/:parent/builds")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/builds"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/builds"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/builds")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/:parent/builds') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/builds";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/:parent/builds
http GET {{baseUrl}}/v1/:parent/builds
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/:parent/builds
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/builds")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.
{{baseUrl}}/v1/projects/:projectId/builds
QUERY PARAMS

projectId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/builds");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/projects/:projectId/builds")
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/builds"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/builds"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/builds");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/builds"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/projects/:projectId/builds HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/projects/:projectId/builds")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/builds"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/projects/:projectId/builds")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/projects/:projectId/builds');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/builds'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/builds';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/builds',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/builds',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/builds'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/projects/:projectId/builds');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/builds'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/builds';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/builds"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/builds" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/builds",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/projects/:projectId/builds');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/builds');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/projects/:projectId/builds');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/builds' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/builds' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/projects/:projectId/builds")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/builds"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/builds"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/builds")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/projects/:projectId/builds') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/builds";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/projects/:projectId/builds
http GET {{baseUrl}}/v1/projects/:projectId/builds
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/builds
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/builds")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger. (POST)
{{baseUrl}}/v1/:name:webhook
QUERY PARAMS

name
BODY json

{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:webhook");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/:name:webhook" {:content-type :json
                                                             :form-params {:contentType ""
                                                                           :data ""
                                                                           :extensions [{}]}})
require "http/client"

url = "{{baseUrl}}/v1/:name:webhook"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/:name:webhook"),
    Content = new StringContent("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:webhook");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:name:webhook"

	payload := strings.NewReader("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/:name:webhook HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67

{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:webhook")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:name:webhook"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:name:webhook")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:webhook")
  .header("content-type", "application/json")
  .body("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
  .asString();
const data = JSON.stringify({
  contentType: '',
  data: '',
  extensions: [
    {}
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/:name:webhook');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:webhook',
  headers: {'content-type': 'application/json'},
  data: {contentType: '', data: '', extensions: [{}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:name:webhook';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contentType":"","data":"","extensions":[{}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:name:webhook',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "contentType": "",\n  "data": "",\n  "extensions": [\n    {}\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:name:webhook")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:name:webhook',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({contentType: '', data: '', extensions: [{}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:webhook',
  headers: {'content-type': 'application/json'},
  body: {contentType: '', data: '', extensions: [{}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/:name:webhook');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  contentType: '',
  data: '',
  extensions: [
    {}
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:webhook',
  headers: {'content-type': 'application/json'},
  data: {contentType: '', data: '', extensions: [{}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:name:webhook';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contentType":"","data":"","extensions":[{}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"contentType": @"",
                              @"data": @"",
                              @"extensions": @[ @{  } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:webhook"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:name:webhook" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:name:webhook",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'contentType' => '',
    'data' => '',
    'extensions' => [
        [
                
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:webhook', [
  'body' => '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:webhook');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'contentType' => '',
  'data' => '',
  'extensions' => [
    [
        
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'contentType' => '',
  'data' => '',
  'extensions' => [
    [
        
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:webhook');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/:name:webhook", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:name:webhook"

payload = {
    "contentType": "",
    "data": "",
    "extensions": [{}]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:name:webhook"

payload <- "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:name:webhook")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/:name:webhook') do |req|
  req.body = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:name:webhook";

    let payload = json!({
        "contentType": "",
        "data": "",
        "extensions": (json!({}))
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/:name:webhook \
  --header 'content-type: application/json' \
  --data '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
echo '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}' |  \
  http POST {{baseUrl}}/v1/:name:webhook \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "contentType": "",\n  "data": "",\n  "extensions": [\n    {}\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/v1/:name:webhook
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "contentType": "",
  "data": "",
  "extensions": [[]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:webhook")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.
{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook
QUERY PARAMS

projectId
trigger
BODY json

{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook" {:content-type :json
                                                                                             :form-params {:contentType ""
                                                                                                           :data ""
                                                                                                           :extensions [{}]}})
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook"),
    Content = new StringContent("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook"

	payload := strings.NewReader("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/projects/:projectId/triggers/:trigger:webhook HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67

{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook")
  .header("content-type", "application/json")
  .body("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
  .asString();
const data = JSON.stringify({
  contentType: '',
  data: '',
  extensions: [
    {}
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook',
  headers: {'content-type': 'application/json'},
  data: {contentType: '', data: '', extensions: [{}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contentType":"","data":"","extensions":[{}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "contentType": "",\n  "data": "",\n  "extensions": [\n    {}\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/triggers/:trigger:webhook',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({contentType: '', data: '', extensions: [{}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook',
  headers: {'content-type': 'application/json'},
  body: {contentType: '', data: '', extensions: [{}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  contentType: '',
  data: '',
  extensions: [
    {}
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook',
  headers: {'content-type': 'application/json'},
  data: {contentType: '', data: '', extensions: [{}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contentType":"","data":"","extensions":[{}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"contentType": @"",
                              @"data": @"",
                              @"extensions": @[ @{  } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'contentType' => '',
    'data' => '',
    'extensions' => [
        [
                
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook', [
  'body' => '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'contentType' => '',
  'data' => '',
  'extensions' => [
    [
        
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'contentType' => '',
  'data' => '',
  'extensions' => [
    [
        
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/projects/:projectId/triggers/:trigger:webhook", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook"

payload = {
    "contentType": "",
    "data": "",
    "extensions": [{}]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook"

payload <- "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/projects/:projectId/triggers/:trigger:webhook') do |req|
  req.body = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook";

    let payload = json!({
        "contentType": "",
        "data": "",
        "extensions": (json!({}))
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook \
  --header 'content-type: application/json' \
  --data '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
echo '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}' |  \
  http POST {{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "contentType": "",\n  "data": "",\n  "extensions": [\n    {}\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "contentType": "",
  "data": "",
  "extensions": [[]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/triggers/:trigger:webhook")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Returns details of a `WorkerPool`.
{{baseUrl}}/v1/:name
QUERY PARAMS

name
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/:name")
require "http/client"

url = "{{baseUrl}}/v1/:name"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:name"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/:name HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:name"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:name")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/:name');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:name',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/:name")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:name',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/:name');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:name" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:name",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/:name');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/:name")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:name"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:name"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/:name') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:name";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/:name
http GET {{baseUrl}}/v1/:name
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/:name
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Returns information about a `BuildTrigger`. This API is experimental.
{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
QUERY PARAMS

projectId
triggerId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/projects/:projectId/triggers/:triggerId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/triggers/:triggerId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/projects/:projectId/triggers/:triggerId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/projects/:projectId/triggers/:triggerId') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
http GET {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.
{{baseUrl}}/v1/projects/:projectId/builds/:id
QUERY PARAMS

projectId
id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/builds/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/projects/:projectId/builds/:id")
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/builds/:id"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/builds/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/builds/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/builds/:id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/projects/:projectId/builds/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/projects/:projectId/builds/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/builds/:id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/projects/:projectId/builds/:id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/projects/:projectId/builds/:id');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/builds/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/builds/:id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/projects/:projectId/builds/:id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/projects/:projectId/builds/:id'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/builds/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/builds/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/builds/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/builds/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/projects/:projectId/builds/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/builds/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/projects/:projectId/builds/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/builds/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/builds/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/projects/:projectId/builds/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/builds/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/builds/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/builds/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/projects/:projectId/builds/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/builds/:id";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/projects/:projectId/builds/:id
http GET {{baseUrl}}/v1/projects/:projectId/builds/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/builds/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/builds/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Runs a `BuildTrigger` at a particular source revision. (POST)
{{baseUrl}}/v1/:name:run
QUERY PARAMS

name
BODY json

{
  "projectId": "",
  "source": {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
  },
  "triggerId": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:run");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/:name:run" {:content-type :json
                                                         :form-params {:projectId ""
                                                                       :source {:branchName ""
                                                                                :commitSha ""
                                                                                :dir ""
                                                                                :invertRegex false
                                                                                :projectId ""
                                                                                :repoName ""
                                                                                :substitutions {}
                                                                                :tagName ""}
                                                                       :triggerId ""}})
require "http/client"

url = "{{baseUrl}}/v1/:name:run"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/:name:run"),
    Content = new StringContent("{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:run");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:name:run"

	payload := strings.NewReader("{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/:name:run HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 227

{
  "projectId": "",
  "source": {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
  },
  "triggerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:run")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:name:run"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:name:run")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:run")
  .header("content-type", "application/json")
  .body("{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  projectId: '',
  source: {
    branchName: '',
    commitSha: '',
    dir: '',
    invertRegex: false,
    projectId: '',
    repoName: '',
    substitutions: {},
    tagName: ''
  },
  triggerId: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/:name:run');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:run',
  headers: {'content-type': 'application/json'},
  data: {
    projectId: '',
    source: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    triggerId: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:name:run';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"projectId":"","source":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"triggerId":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:name:run',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "projectId": "",\n  "source": {\n    "branchName": "",\n    "commitSha": "",\n    "dir": "",\n    "invertRegex": false,\n    "projectId": "",\n    "repoName": "",\n    "substitutions": {},\n    "tagName": ""\n  },\n  "triggerId": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:name:run")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:name:run',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  projectId: '',
  source: {
    branchName: '',
    commitSha: '',
    dir: '',
    invertRegex: false,
    projectId: '',
    repoName: '',
    substitutions: {},
    tagName: ''
  },
  triggerId: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:run',
  headers: {'content-type': 'application/json'},
  body: {
    projectId: '',
    source: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    triggerId: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/:name:run');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  projectId: '',
  source: {
    branchName: '',
    commitSha: '',
    dir: '',
    invertRegex: false,
    projectId: '',
    repoName: '',
    substitutions: {},
    tagName: ''
  },
  triggerId: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:name:run',
  headers: {'content-type': 'application/json'},
  data: {
    projectId: '',
    source: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    triggerId: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:name:run';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"projectId":"","source":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"triggerId":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"projectId": @"",
                              @"source": @{ @"branchName": @"", @"commitSha": @"", @"dir": @"", @"invertRegex": @NO, @"projectId": @"", @"repoName": @"", @"substitutions": @{  }, @"tagName": @"" },
                              @"triggerId": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:run"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:name:run" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:name:run",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'projectId' => '',
    'source' => [
        'branchName' => '',
        'commitSha' => '',
        'dir' => '',
        'invertRegex' => null,
        'projectId' => '',
        'repoName' => '',
        'substitutions' => [
                
        ],
        'tagName' => ''
    ],
    'triggerId' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:run', [
  'body' => '{
  "projectId": "",
  "source": {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
  },
  "triggerId": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:run');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'projectId' => '',
  'source' => [
    'branchName' => '',
    'commitSha' => '',
    'dir' => '',
    'invertRegex' => null,
    'projectId' => '',
    'repoName' => '',
    'substitutions' => [
        
    ],
    'tagName' => ''
  ],
  'triggerId' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'projectId' => '',
  'source' => [
    'branchName' => '',
    'commitSha' => '',
    'dir' => '',
    'invertRegex' => null,
    'projectId' => '',
    'repoName' => '',
    'substitutions' => [
        
    ],
    'tagName' => ''
  ],
  'triggerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:run');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "projectId": "",
  "source": {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
  },
  "triggerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "projectId": "",
  "source": {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
  },
  "triggerId": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/:name:run", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:name:run"

payload = {
    "projectId": "",
    "source": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": False,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
    },
    "triggerId": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:name:run"

payload <- "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:name:run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/:name:run') do |req|
  req.body = "{\n  \"projectId\": \"\",\n  \"source\": {\n    \"branchName\": \"\",\n    \"commitSha\": \"\",\n    \"dir\": \"\",\n    \"invertRegex\": false,\n    \"projectId\": \"\",\n    \"repoName\": \"\",\n    \"substitutions\": {},\n    \"tagName\": \"\"\n  },\n  \"triggerId\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:name:run";

    let payload = json!({
        "projectId": "",
        "source": json!({
            "branchName": "",
            "commitSha": "",
            "dir": "",
            "invertRegex": false,
            "projectId": "",
            "repoName": "",
            "substitutions": json!({}),
            "tagName": ""
        }),
        "triggerId": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/:name:run \
  --header 'content-type: application/json' \
  --data '{
  "projectId": "",
  "source": {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
  },
  "triggerId": ""
}'
echo '{
  "projectId": "",
  "source": {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
  },
  "triggerId": ""
}' |  \
  http POST {{baseUrl}}/v1/:name:run \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "projectId": "",\n  "source": {\n    "branchName": "",\n    "commitSha": "",\n    "dir": "",\n    "invertRegex": false,\n    "projectId": "",\n    "repoName": "",\n    "substitutions": {},\n    "tagName": ""\n  },\n  "triggerId": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1/:name:run
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "projectId": "",
  "source": [
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": false,
    "projectId": "",
    "repoName": "",
    "substitutions": [],
    "tagName": ""
  ],
  "triggerId": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:run")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Runs a `BuildTrigger` at a particular source revision.
{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run
QUERY PARAMS

projectId
triggerId
BODY json

{
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": {},
  "tagName": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run" {:content-type :json
                                                                                           :form-params {:branchName ""
                                                                                                         :commitSha ""
                                                                                                         :dir ""
                                                                                                         :invertRegex false
                                                                                                         :projectId ""
                                                                                                         :repoName ""
                                                                                                         :substitutions {}
                                                                                                         :tagName ""}})
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run"),
    Content = new StringContent("{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run"

	payload := strings.NewReader("{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/projects/:projectId/triggers/:triggerId:run HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 155

{
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": {},
  "tagName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run")
  .header("content-type", "application/json")
  .body("{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  branchName: '',
  commitSha: '',
  dir: '',
  invertRegex: false,
  projectId: '',
  repoName: '',
  substitutions: {},
  tagName: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run',
  headers: {'content-type': 'application/json'},
  data: {
    branchName: '',
    commitSha: '',
    dir: '',
    invertRegex: false,
    projectId: '',
    repoName: '',
    substitutions: {},
    tagName: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "branchName": "",\n  "commitSha": "",\n  "dir": "",\n  "invertRegex": false,\n  "projectId": "",\n  "repoName": "",\n  "substitutions": {},\n  "tagName": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/triggers/:triggerId:run',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  branchName: '',
  commitSha: '',
  dir: '',
  invertRegex: false,
  projectId: '',
  repoName: '',
  substitutions: {},
  tagName: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run',
  headers: {'content-type': 'application/json'},
  body: {
    branchName: '',
    commitSha: '',
    dir: '',
    invertRegex: false,
    projectId: '',
    repoName: '',
    substitutions: {},
    tagName: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  branchName: '',
  commitSha: '',
  dir: '',
  invertRegex: false,
  projectId: '',
  repoName: '',
  substitutions: {},
  tagName: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run',
  headers: {'content-type': 'application/json'},
  data: {
    branchName: '',
    commitSha: '',
    dir: '',
    invertRegex: false,
    projectId: '',
    repoName: '',
    substitutions: {},
    tagName: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"branchName": @"",
                              @"commitSha": @"",
                              @"dir": @"",
                              @"invertRegex": @NO,
                              @"projectId": @"",
                              @"repoName": @"",
                              @"substitutions": @{  },
                              @"tagName": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'branchName' => '',
    'commitSha' => '',
    'dir' => '',
    'invertRegex' => null,
    'projectId' => '',
    'repoName' => '',
    'substitutions' => [
        
    ],
    'tagName' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run', [
  'body' => '{
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": {},
  "tagName": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'branchName' => '',
  'commitSha' => '',
  'dir' => '',
  'invertRegex' => null,
  'projectId' => '',
  'repoName' => '',
  'substitutions' => [
    
  ],
  'tagName' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'branchName' => '',
  'commitSha' => '',
  'dir' => '',
  'invertRegex' => null,
  'projectId' => '',
  'repoName' => '',
  'substitutions' => [
    
  ],
  'tagName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": {},
  "tagName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": {},
  "tagName": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/projects/:projectId/triggers/:triggerId:run", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run"

payload = {
    "branchName": "",
    "commitSha": "",
    "dir": "",
    "invertRegex": False,
    "projectId": "",
    "repoName": "",
    "substitutions": {},
    "tagName": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run"

payload <- "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/projects/:projectId/triggers/:triggerId:run') do |req|
  req.body = "{\n  \"branchName\": \"\",\n  \"commitSha\": \"\",\n  \"dir\": \"\",\n  \"invertRegex\": false,\n  \"projectId\": \"\",\n  \"repoName\": \"\",\n  \"substitutions\": {},\n  \"tagName\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run";

    let payload = json!({
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": json!({}),
        "tagName": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run \
  --header 'content-type: application/json' \
  --data '{
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": {},
  "tagName": ""
}'
echo '{
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": {},
  "tagName": ""
}' |  \
  http POST {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "branchName": "",\n  "commitSha": "",\n  "dir": "",\n  "invertRegex": false,\n  "projectId": "",\n  "repoName": "",\n  "substitutions": {},\n  "tagName": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "branchName": "",
  "commitSha": "",
  "dir": "",
  "invertRegex": false,
  "projectId": "",
  "repoName": "",
  "substitutions": [],
  "tagName": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId:run")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`). (POST)
{{baseUrl}}/v1/:parent/builds
QUERY PARAMS

parent
BODY json

{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/builds");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/:parent/builds" {:content-type :json
                                                              :form-params {:approval {:config {:approvalRequired false}
                                                                                       :result {:approvalTime ""
                                                                                                :approverAccount ""
                                                                                                :comment ""
                                                                                                :decision ""
                                                                                                :url ""}
                                                                                       :state ""}
                                                                            :artifacts {:images []
                                                                                        :objects {:location ""
                                                                                                  :paths []
                                                                                                  :timing {:endTime ""
                                                                                                           :startTime ""}}}
                                                                            :availableSecrets {:inline [{:envMap {}
                                                                                                         :kmsKeyName ""}]
                                                                                               :secretManager [{:env ""
                                                                                                                :versionName ""}]}
                                                                            :buildTriggerId ""
                                                                            :createTime ""
                                                                            :failureInfo {:detail ""
                                                                                          :type ""}
                                                                            :finishTime ""
                                                                            :id ""
                                                                            :images []
                                                                            :logUrl ""
                                                                            :logsBucket ""
                                                                            :name ""
                                                                            :options {:diskSizeGb ""
                                                                                      :dynamicSubstitutions false
                                                                                      :env []
                                                                                      :logStreamingOption ""
                                                                                      :logging ""
                                                                                      :machineType ""
                                                                                      :pool {:name ""}
                                                                                      :requestedVerifyOption ""
                                                                                      :secretEnv []
                                                                                      :sourceProvenanceHash []
                                                                                      :substitutionOption ""
                                                                                      :volumes [{:name ""
                                                                                                 :path ""}]
                                                                                      :workerPool ""}
                                                                            :projectId ""
                                                                            :queueTtl ""
                                                                            :results {:artifactManifest ""
                                                                                      :artifactTiming {}
                                                                                      :buildStepImages []
                                                                                      :buildStepOutputs []
                                                                                      :images [{:digest ""
                                                                                                :name ""
                                                                                                :pushTiming {}}]
                                                                                      :numArtifacts ""}
                                                                            :secrets [{:kmsKeyName ""
                                                                                       :secretEnv {}}]
                                                                            :serviceAccount ""
                                                                            :source {:repoSource {:branchName ""
                                                                                                  :commitSha ""
                                                                                                  :dir ""
                                                                                                  :invertRegex false
                                                                                                  :projectId ""
                                                                                                  :repoName ""
                                                                                                  :substitutions {}
                                                                                                  :tagName ""}
                                                                                     :storageSource {:bucket ""
                                                                                                     :generation ""
                                                                                                     :object ""}
                                                                                     :storageSourceManifest {:bucket ""
                                                                                                             :generation ""
                                                                                                             :object ""}}
                                                                            :sourceProvenance {:fileHashes {}
                                                                                               :resolvedRepoSource {}
                                                                                               :resolvedStorageSource {}
                                                                                               :resolvedStorageSourceManifest {}}
                                                                            :startTime ""
                                                                            :status ""
                                                                            :statusDetail ""
                                                                            :steps [{:args []
                                                                                     :dir ""
                                                                                     :entrypoint ""
                                                                                     :env []
                                                                                     :id ""
                                                                                     :name ""
                                                                                     :pullTiming {}
                                                                                     :script ""
                                                                                     :secretEnv []
                                                                                     :status ""
                                                                                     :timeout ""
                                                                                     :timing {}
                                                                                     :volumes [{}]
                                                                                     :waitFor []}]
                                                                            :substitutions {}
                                                                            :tags []
                                                                            :timeout ""
                                                                            :timing {}
                                                                            :warnings [{:priority ""
                                                                                        :text ""}]}})
require "http/client"

url = "{{baseUrl}}/v1/:parent/builds"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/:parent/builds"),
    Content = new StringContent("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/builds");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:parent/builds"

	payload := strings.NewReader("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/:parent/builds HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2730

{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/builds")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:parent/builds"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:parent/builds")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/builds")
  .header("content-type", "application/json")
  .body("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  approval: {
    config: {
      approvalRequired: false
    },
    result: {
      approvalTime: '',
      approverAccount: '',
      comment: '',
      decision: '',
      url: ''
    },
    state: ''
  },
  artifacts: {
    images: [],
    objects: {
      location: '',
      paths: [],
      timing: {
        endTime: '',
        startTime: ''
      }
    }
  },
  availableSecrets: {
    inline: [
      {
        envMap: {},
        kmsKeyName: ''
      }
    ],
    secretManager: [
      {
        env: '',
        versionName: ''
      }
    ]
  },
  buildTriggerId: '',
  createTime: '',
  failureInfo: {
    detail: '',
    type: ''
  },
  finishTime: '',
  id: '',
  images: [],
  logUrl: '',
  logsBucket: '',
  name: '',
  options: {
    diskSizeGb: '',
    dynamicSubstitutions: false,
    env: [],
    logStreamingOption: '',
    logging: '',
    machineType: '',
    pool: {
      name: ''
    },
    requestedVerifyOption: '',
    secretEnv: [],
    sourceProvenanceHash: [],
    substitutionOption: '',
    volumes: [
      {
        name: '',
        path: ''
      }
    ],
    workerPool: ''
  },
  projectId: '',
  queueTtl: '',
  results: {
    artifactManifest: '',
    artifactTiming: {},
    buildStepImages: [],
    buildStepOutputs: [],
    images: [
      {
        digest: '',
        name: '',
        pushTiming: {}
      }
    ],
    numArtifacts: ''
  },
  secrets: [
    {
      kmsKeyName: '',
      secretEnv: {}
    }
  ],
  serviceAccount: '',
  source: {
    repoSource: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    storageSource: {
      bucket: '',
      generation: '',
      object: ''
    },
    storageSourceManifest: {
      bucket: '',
      generation: '',
      object: ''
    }
  },
  sourceProvenance: {
    fileHashes: {},
    resolvedRepoSource: {},
    resolvedStorageSource: {},
    resolvedStorageSourceManifest: {}
  },
  startTime: '',
  status: '',
  statusDetail: '',
  steps: [
    {
      args: [],
      dir: '',
      entrypoint: '',
      env: [],
      id: '',
      name: '',
      pullTiming: {},
      script: '',
      secretEnv: [],
      status: '',
      timeout: '',
      timing: {},
      volumes: [
        {}
      ],
      waitFor: []
    }
  ],
  substitutions: {},
  tags: [],
  timeout: '',
  timing: {},
  warnings: [
    {
      priority: '',
      text: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/:parent/builds');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/builds',
  headers: {'content-type': 'application/json'},
  data: {
    approval: {
      config: {approvalRequired: false},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/builds';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approval":{"config":{"approvalRequired":false},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:parent/builds',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "approval": {\n    "config": {\n      "approvalRequired": false\n    },\n    "result": {\n      "approvalTime": "",\n      "approverAccount": "",\n      "comment": "",\n      "decision": "",\n      "url": ""\n    },\n    "state": ""\n  },\n  "artifacts": {\n    "images": [],\n    "objects": {\n      "location": "",\n      "paths": [],\n      "timing": {\n        "endTime": "",\n        "startTime": ""\n      }\n    }\n  },\n  "availableSecrets": {\n    "inline": [\n      {\n        "envMap": {},\n        "kmsKeyName": ""\n      }\n    ],\n    "secretManager": [\n      {\n        "env": "",\n        "versionName": ""\n      }\n    ]\n  },\n  "buildTriggerId": "",\n  "createTime": "",\n  "failureInfo": {\n    "detail": "",\n    "type": ""\n  },\n  "finishTime": "",\n  "id": "",\n  "images": [],\n  "logUrl": "",\n  "logsBucket": "",\n  "name": "",\n  "options": {\n    "diskSizeGb": "",\n    "dynamicSubstitutions": false,\n    "env": [],\n    "logStreamingOption": "",\n    "logging": "",\n    "machineType": "",\n    "pool": {\n      "name": ""\n    },\n    "requestedVerifyOption": "",\n    "secretEnv": [],\n    "sourceProvenanceHash": [],\n    "substitutionOption": "",\n    "volumes": [\n      {\n        "name": "",\n        "path": ""\n      }\n    ],\n    "workerPool": ""\n  },\n  "projectId": "",\n  "queueTtl": "",\n  "results": {\n    "artifactManifest": "",\n    "artifactTiming": {},\n    "buildStepImages": [],\n    "buildStepOutputs": [],\n    "images": [\n      {\n        "digest": "",\n        "name": "",\n        "pushTiming": {}\n      }\n    ],\n    "numArtifacts": ""\n  },\n  "secrets": [\n    {\n      "kmsKeyName": "",\n      "secretEnv": {}\n    }\n  ],\n  "serviceAccount": "",\n  "source": {\n    "repoSource": {\n      "branchName": "",\n      "commitSha": "",\n      "dir": "",\n      "invertRegex": false,\n      "projectId": "",\n      "repoName": "",\n      "substitutions": {},\n      "tagName": ""\n    },\n    "storageSource": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    },\n    "storageSourceManifest": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    }\n  },\n  "sourceProvenance": {\n    "fileHashes": {},\n    "resolvedRepoSource": {},\n    "resolvedStorageSource": {},\n    "resolvedStorageSourceManifest": {}\n  },\n  "startTime": "",\n  "status": "",\n  "statusDetail": "",\n  "steps": [\n    {\n      "args": [],\n      "dir": "",\n      "entrypoint": "",\n      "env": [],\n      "id": "",\n      "name": "",\n      "pullTiming": {},\n      "script": "",\n      "secretEnv": [],\n      "status": "",\n      "timeout": "",\n      "timing": {},\n      "volumes": [\n        {}\n      ],\n      "waitFor": []\n    }\n  ],\n  "substitutions": {},\n  "tags": [],\n  "timeout": "",\n  "timing": {},\n  "warnings": [\n    {\n      "priority": "",\n      "text": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:parent/builds")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:parent/builds',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  approval: {
    config: {approvalRequired: false},
    result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
    state: ''
  },
  artifacts: {
    images: [],
    objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
  },
  availableSecrets: {
    inline: [{envMap: {}, kmsKeyName: ''}],
    secretManager: [{env: '', versionName: ''}]
  },
  buildTriggerId: '',
  createTime: '',
  failureInfo: {detail: '', type: ''},
  finishTime: '',
  id: '',
  images: [],
  logUrl: '',
  logsBucket: '',
  name: '',
  options: {
    diskSizeGb: '',
    dynamicSubstitutions: false,
    env: [],
    logStreamingOption: '',
    logging: '',
    machineType: '',
    pool: {name: ''},
    requestedVerifyOption: '',
    secretEnv: [],
    sourceProvenanceHash: [],
    substitutionOption: '',
    volumes: [{name: '', path: ''}],
    workerPool: ''
  },
  projectId: '',
  queueTtl: '',
  results: {
    artifactManifest: '',
    artifactTiming: {},
    buildStepImages: [],
    buildStepOutputs: [],
    images: [{digest: '', name: '', pushTiming: {}}],
    numArtifacts: ''
  },
  secrets: [{kmsKeyName: '', secretEnv: {}}],
  serviceAccount: '',
  source: {
    repoSource: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    storageSource: {bucket: '', generation: '', object: ''},
    storageSourceManifest: {bucket: '', generation: '', object: ''}
  },
  sourceProvenance: {
    fileHashes: {},
    resolvedRepoSource: {},
    resolvedStorageSource: {},
    resolvedStorageSourceManifest: {}
  },
  startTime: '',
  status: '',
  statusDetail: '',
  steps: [
    {
      args: [],
      dir: '',
      entrypoint: '',
      env: [],
      id: '',
      name: '',
      pullTiming: {},
      script: '',
      secretEnv: [],
      status: '',
      timeout: '',
      timing: {},
      volumes: [{}],
      waitFor: []
    }
  ],
  substitutions: {},
  tags: [],
  timeout: '',
  timing: {},
  warnings: [{priority: '', text: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/builds',
  headers: {'content-type': 'application/json'},
  body: {
    approval: {
      config: {approvalRequired: false},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/:parent/builds');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  approval: {
    config: {
      approvalRequired: false
    },
    result: {
      approvalTime: '',
      approverAccount: '',
      comment: '',
      decision: '',
      url: ''
    },
    state: ''
  },
  artifacts: {
    images: [],
    objects: {
      location: '',
      paths: [],
      timing: {
        endTime: '',
        startTime: ''
      }
    }
  },
  availableSecrets: {
    inline: [
      {
        envMap: {},
        kmsKeyName: ''
      }
    ],
    secretManager: [
      {
        env: '',
        versionName: ''
      }
    ]
  },
  buildTriggerId: '',
  createTime: '',
  failureInfo: {
    detail: '',
    type: ''
  },
  finishTime: '',
  id: '',
  images: [],
  logUrl: '',
  logsBucket: '',
  name: '',
  options: {
    diskSizeGb: '',
    dynamicSubstitutions: false,
    env: [],
    logStreamingOption: '',
    logging: '',
    machineType: '',
    pool: {
      name: ''
    },
    requestedVerifyOption: '',
    secretEnv: [],
    sourceProvenanceHash: [],
    substitutionOption: '',
    volumes: [
      {
        name: '',
        path: ''
      }
    ],
    workerPool: ''
  },
  projectId: '',
  queueTtl: '',
  results: {
    artifactManifest: '',
    artifactTiming: {},
    buildStepImages: [],
    buildStepOutputs: [],
    images: [
      {
        digest: '',
        name: '',
        pushTiming: {}
      }
    ],
    numArtifacts: ''
  },
  secrets: [
    {
      kmsKeyName: '',
      secretEnv: {}
    }
  ],
  serviceAccount: '',
  source: {
    repoSource: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    storageSource: {
      bucket: '',
      generation: '',
      object: ''
    },
    storageSourceManifest: {
      bucket: '',
      generation: '',
      object: ''
    }
  },
  sourceProvenance: {
    fileHashes: {},
    resolvedRepoSource: {},
    resolvedStorageSource: {},
    resolvedStorageSourceManifest: {}
  },
  startTime: '',
  status: '',
  statusDetail: '',
  steps: [
    {
      args: [],
      dir: '',
      entrypoint: '',
      env: [],
      id: '',
      name: '',
      pullTiming: {},
      script: '',
      secretEnv: [],
      status: '',
      timeout: '',
      timing: {},
      volumes: [
        {}
      ],
      waitFor: []
    }
  ],
  substitutions: {},
  tags: [],
  timeout: '',
  timing: {},
  warnings: [
    {
      priority: '',
      text: ''
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/:parent/builds',
  headers: {'content-type': 'application/json'},
  data: {
    approval: {
      config: {approvalRequired: false},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:parent/builds';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approval":{"config":{"approvalRequired":false},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"approval": @{ @"config": @{ @"approvalRequired": @NO }, @"result": @{ @"approvalTime": @"", @"approverAccount": @"", @"comment": @"", @"decision": @"", @"url": @"" }, @"state": @"" },
                              @"artifacts": @{ @"images": @[  ], @"objects": @{ @"location": @"", @"paths": @[  ], @"timing": @{ @"endTime": @"", @"startTime": @"" } } },
                              @"availableSecrets": @{ @"inline": @[ @{ @"envMap": @{  }, @"kmsKeyName": @"" } ], @"secretManager": @[ @{ @"env": @"", @"versionName": @"" } ] },
                              @"buildTriggerId": @"",
                              @"createTime": @"",
                              @"failureInfo": @{ @"detail": @"", @"type": @"" },
                              @"finishTime": @"",
                              @"id": @"",
                              @"images": @[  ],
                              @"logUrl": @"",
                              @"logsBucket": @"",
                              @"name": @"",
                              @"options": @{ @"diskSizeGb": @"", @"dynamicSubstitutions": @NO, @"env": @[  ], @"logStreamingOption": @"", @"logging": @"", @"machineType": @"", @"pool": @{ @"name": @"" }, @"requestedVerifyOption": @"", @"secretEnv": @[  ], @"sourceProvenanceHash": @[  ], @"substitutionOption": @"", @"volumes": @[ @{ @"name": @"", @"path": @"" } ], @"workerPool": @"" },
                              @"projectId": @"",
                              @"queueTtl": @"",
                              @"results": @{ @"artifactManifest": @"", @"artifactTiming": @{  }, @"buildStepImages": @[  ], @"buildStepOutputs": @[  ], @"images": @[ @{ @"digest": @"", @"name": @"", @"pushTiming": @{  } } ], @"numArtifacts": @"" },
                              @"secrets": @[ @{ @"kmsKeyName": @"", @"secretEnv": @{  } } ],
                              @"serviceAccount": @"",
                              @"source": @{ @"repoSource": @{ @"branchName": @"", @"commitSha": @"", @"dir": @"", @"invertRegex": @NO, @"projectId": @"", @"repoName": @"", @"substitutions": @{  }, @"tagName": @"" }, @"storageSource": @{ @"bucket": @"", @"generation": @"", @"object": @"" }, @"storageSourceManifest": @{ @"bucket": @"", @"generation": @"", @"object": @"" } },
                              @"sourceProvenance": @{ @"fileHashes": @{  }, @"resolvedRepoSource": @{  }, @"resolvedStorageSource": @{  }, @"resolvedStorageSourceManifest": @{  } },
                              @"startTime": @"",
                              @"status": @"",
                              @"statusDetail": @"",
                              @"steps": @[ @{ @"args": @[  ], @"dir": @"", @"entrypoint": @"", @"env": @[  ], @"id": @"", @"name": @"", @"pullTiming": @{  }, @"script": @"", @"secretEnv": @[  ], @"status": @"", @"timeout": @"", @"timing": @{  }, @"volumes": @[ @{  } ], @"waitFor": @[  ] } ],
                              @"substitutions": @{  },
                              @"tags": @[  ],
                              @"timeout": @"",
                              @"timing": @{  },
                              @"warnings": @[ @{ @"priority": @"", @"text": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/builds"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:parent/builds" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:parent/builds",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'approval' => [
        'config' => [
                'approvalRequired' => null
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/builds', [
  'body' => '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/builds');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'approval' => [
    'config' => [
        'approvalRequired' => null
    ],
    'result' => [
        'approvalTime' => '',
        'approverAccount' => '',
        'comment' => '',
        'decision' => '',
        'url' => ''
    ],
    'state' => ''
  ],
  'artifacts' => [
    'images' => [
        
    ],
    'objects' => [
        'location' => '',
        'paths' => [
                
        ],
        'timing' => [
                'endTime' => '',
                'startTime' => ''
        ]
    ]
  ],
  'availableSecrets' => [
    'inline' => [
        [
                'envMap' => [
                                
                ],
                'kmsKeyName' => ''
        ]
    ],
    'secretManager' => [
        [
                'env' => '',
                'versionName' => ''
        ]
    ]
  ],
  'buildTriggerId' => '',
  'createTime' => '',
  'failureInfo' => [
    'detail' => '',
    'type' => ''
  ],
  'finishTime' => '',
  'id' => '',
  'images' => [
    
  ],
  'logUrl' => '',
  'logsBucket' => '',
  'name' => '',
  'options' => [
    'diskSizeGb' => '',
    'dynamicSubstitutions' => null,
    'env' => [
        
    ],
    'logStreamingOption' => '',
    'logging' => '',
    'machineType' => '',
    'pool' => [
        'name' => ''
    ],
    'requestedVerifyOption' => '',
    'secretEnv' => [
        
    ],
    'sourceProvenanceHash' => [
        
    ],
    'substitutionOption' => '',
    'volumes' => [
        [
                'name' => '',
                'path' => ''
        ]
    ],
    'workerPool' => ''
  ],
  'projectId' => '',
  'queueTtl' => '',
  'results' => [
    'artifactManifest' => '',
    'artifactTiming' => [
        
    ],
    'buildStepImages' => [
        
    ],
    'buildStepOutputs' => [
        
    ],
    'images' => [
        [
                'digest' => '',
                'name' => '',
                'pushTiming' => [
                                
                ]
        ]
    ],
    'numArtifacts' => ''
  ],
  'secrets' => [
    [
        'kmsKeyName' => '',
        'secretEnv' => [
                
        ]
    ]
  ],
  'serviceAccount' => '',
  'source' => [
    'repoSource' => [
        'branchName' => '',
        'commitSha' => '',
        'dir' => '',
        'invertRegex' => null,
        'projectId' => '',
        'repoName' => '',
        'substitutions' => [
                
        ],
        'tagName' => ''
    ],
    'storageSource' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ],
    'storageSourceManifest' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ]
  ],
  'sourceProvenance' => [
    'fileHashes' => [
        
    ],
    'resolvedRepoSource' => [
        
    ],
    'resolvedStorageSource' => [
        
    ],
    'resolvedStorageSourceManifest' => [
        
    ]
  ],
  'startTime' => '',
  'status' => '',
  'statusDetail' => '',
  'steps' => [
    [
        'args' => [
                
        ],
        'dir' => '',
        'entrypoint' => '',
        'env' => [
                
        ],
        'id' => '',
        'name' => '',
        'pullTiming' => [
                
        ],
        'script' => '',
        'secretEnv' => [
                
        ],
        'status' => '',
        'timeout' => '',
        'timing' => [
                
        ],
        'volumes' => [
                [
                                
                ]
        ],
        'waitFor' => [
                
        ]
    ]
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'timeout' => '',
  'timing' => [
    
  ],
  'warnings' => [
    [
        'priority' => '',
        'text' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'approval' => [
    'config' => [
        'approvalRequired' => null
    ],
    'result' => [
        'approvalTime' => '',
        'approverAccount' => '',
        'comment' => '',
        'decision' => '',
        'url' => ''
    ],
    'state' => ''
  ],
  'artifacts' => [
    'images' => [
        
    ],
    'objects' => [
        'location' => '',
        'paths' => [
                
        ],
        'timing' => [
                'endTime' => '',
                'startTime' => ''
        ]
    ]
  ],
  'availableSecrets' => [
    'inline' => [
        [
                'envMap' => [
                                
                ],
                'kmsKeyName' => ''
        ]
    ],
    'secretManager' => [
        [
                'env' => '',
                'versionName' => ''
        ]
    ]
  ],
  'buildTriggerId' => '',
  'createTime' => '',
  'failureInfo' => [
    'detail' => '',
    'type' => ''
  ],
  'finishTime' => '',
  'id' => '',
  'images' => [
    
  ],
  'logUrl' => '',
  'logsBucket' => '',
  'name' => '',
  'options' => [
    'diskSizeGb' => '',
    'dynamicSubstitutions' => null,
    'env' => [
        
    ],
    'logStreamingOption' => '',
    'logging' => '',
    'machineType' => '',
    'pool' => [
        'name' => ''
    ],
    'requestedVerifyOption' => '',
    'secretEnv' => [
        
    ],
    'sourceProvenanceHash' => [
        
    ],
    'substitutionOption' => '',
    'volumes' => [
        [
                'name' => '',
                'path' => ''
        ]
    ],
    'workerPool' => ''
  ],
  'projectId' => '',
  'queueTtl' => '',
  'results' => [
    'artifactManifest' => '',
    'artifactTiming' => [
        
    ],
    'buildStepImages' => [
        
    ],
    'buildStepOutputs' => [
        
    ],
    'images' => [
        [
                'digest' => '',
                'name' => '',
                'pushTiming' => [
                                
                ]
        ]
    ],
    'numArtifacts' => ''
  ],
  'secrets' => [
    [
        'kmsKeyName' => '',
        'secretEnv' => [
                
        ]
    ]
  ],
  'serviceAccount' => '',
  'source' => [
    'repoSource' => [
        'branchName' => '',
        'commitSha' => '',
        'dir' => '',
        'invertRegex' => null,
        'projectId' => '',
        'repoName' => '',
        'substitutions' => [
                
        ],
        'tagName' => ''
    ],
    'storageSource' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ],
    'storageSourceManifest' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ]
  ],
  'sourceProvenance' => [
    'fileHashes' => [
        
    ],
    'resolvedRepoSource' => [
        
    ],
    'resolvedStorageSource' => [
        
    ],
    'resolvedStorageSourceManifest' => [
        
    ]
  ],
  'startTime' => '',
  'status' => '',
  'statusDetail' => '',
  'steps' => [
    [
        'args' => [
                
        ],
        'dir' => '',
        'entrypoint' => '',
        'env' => [
                
        ],
        'id' => '',
        'name' => '',
        'pullTiming' => [
                
        ],
        'script' => '',
        'secretEnv' => [
                
        ],
        'status' => '',
        'timeout' => '',
        'timing' => [
                
        ],
        'volumes' => [
                [
                                
                ]
        ],
        'waitFor' => [
                
        ]
    ]
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'timeout' => '',
  'timing' => [
    
  ],
  'warnings' => [
    [
        'priority' => '',
        'text' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/builds');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/builds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/builds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/:parent/builds", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:parent/builds"

payload = {
    "approval": {
        "config": { "approvalRequired": False },
        "result": {
            "approvalTime": "",
            "approverAccount": "",
            "comment": "",
            "decision": "",
            "url": ""
        },
        "state": ""
    },
    "artifacts": {
        "images": [],
        "objects": {
            "location": "",
            "paths": [],
            "timing": {
                "endTime": "",
                "startTime": ""
            }
        }
    },
    "availableSecrets": {
        "inline": [
            {
                "envMap": {},
                "kmsKeyName": ""
            }
        ],
        "secretManager": [
            {
                "env": "",
                "versionName": ""
            }
        ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
        "detail": "",
        "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
        "diskSizeGb": "",
        "dynamicSubstitutions": False,
        "env": [],
        "logStreamingOption": "",
        "logging": "",
        "machineType": "",
        "pool": { "name": "" },
        "requestedVerifyOption": "",
        "secretEnv": [],
        "sourceProvenanceHash": [],
        "substitutionOption": "",
        "volumes": [
            {
                "name": "",
                "path": ""
            }
        ],
        "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
        "artifactManifest": "",
        "artifactTiming": {},
        "buildStepImages": [],
        "buildStepOutputs": [],
        "images": [
            {
                "digest": "",
                "name": "",
                "pushTiming": {}
            }
        ],
        "numArtifacts": ""
    },
    "secrets": [
        {
            "kmsKeyName": "",
            "secretEnv": {}
        }
    ],
    "serviceAccount": "",
    "source": {
        "repoSource": {
            "branchName": "",
            "commitSha": "",
            "dir": "",
            "invertRegex": False,
            "projectId": "",
            "repoName": "",
            "substitutions": {},
            "tagName": ""
        },
        "storageSource": {
            "bucket": "",
            "generation": "",
            "object": ""
        },
        "storageSourceManifest": {
            "bucket": "",
            "generation": "",
            "object": ""
        }
    },
    "sourceProvenance": {
        "fileHashes": {},
        "resolvedRepoSource": {},
        "resolvedStorageSource": {},
        "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
        {
            "args": [],
            "dir": "",
            "entrypoint": "",
            "env": [],
            "id": "",
            "name": "",
            "pullTiming": {},
            "script": "",
            "secretEnv": [],
            "status": "",
            "timeout": "",
            "timing": {},
            "volumes": [{}],
            "waitFor": []
        }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
        {
            "priority": "",
            "text": ""
        }
    ]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:parent/builds"

payload <- "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:parent/builds")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/:parent/builds') do |req|
  req.body = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:parent/builds";

    let payload = json!({
        "approval": json!({
            "config": json!({"approvalRequired": false}),
            "result": json!({
                "approvalTime": "",
                "approverAccount": "",
                "comment": "",
                "decision": "",
                "url": ""
            }),
            "state": ""
        }),
        "artifacts": json!({
            "images": (),
            "objects": json!({
                "location": "",
                "paths": (),
                "timing": json!({
                    "endTime": "",
                    "startTime": ""
                })
            })
        }),
        "availableSecrets": json!({
            "inline": (
                json!({
                    "envMap": json!({}),
                    "kmsKeyName": ""
                })
            ),
            "secretManager": (
                json!({
                    "env": "",
                    "versionName": ""
                })
            )
        }),
        "buildTriggerId": "",
        "createTime": "",
        "failureInfo": json!({
            "detail": "",
            "type": ""
        }),
        "finishTime": "",
        "id": "",
        "images": (),
        "logUrl": "",
        "logsBucket": "",
        "name": "",
        "options": json!({
            "diskSizeGb": "",
            "dynamicSubstitutions": false,
            "env": (),
            "logStreamingOption": "",
            "logging": "",
            "machineType": "",
            "pool": json!({"name": ""}),
            "requestedVerifyOption": "",
            "secretEnv": (),
            "sourceProvenanceHash": (),
            "substitutionOption": "",
            "volumes": (
                json!({
                    "name": "",
                    "path": ""
                })
            ),
            "workerPool": ""
        }),
        "projectId": "",
        "queueTtl": "",
        "results": json!({
            "artifactManifest": "",
            "artifactTiming": json!({}),
            "buildStepImages": (),
            "buildStepOutputs": (),
            "images": (
                json!({
                    "digest": "",
                    "name": "",
                    "pushTiming": json!({})
                })
            ),
            "numArtifacts": ""
        }),
        "secrets": (
            json!({
                "kmsKeyName": "",
                "secretEnv": json!({})
            })
        ),
        "serviceAccount": "",
        "source": json!({
            "repoSource": json!({
                "branchName": "",
                "commitSha": "",
                "dir": "",
                "invertRegex": false,
                "projectId": "",
                "repoName": "",
                "substitutions": json!({}),
                "tagName": ""
            }),
            "storageSource": json!({
                "bucket": "",
                "generation": "",
                "object": ""
            }),
            "storageSourceManifest": json!({
                "bucket": "",
                "generation": "",
                "object": ""
            })
        }),
        "sourceProvenance": json!({
            "fileHashes": json!({}),
            "resolvedRepoSource": json!({}),
            "resolvedStorageSource": json!({}),
            "resolvedStorageSourceManifest": json!({})
        }),
        "startTime": "",
        "status": "",
        "statusDetail": "",
        "steps": (
            json!({
                "args": (),
                "dir": "",
                "entrypoint": "",
                "env": (),
                "id": "",
                "name": "",
                "pullTiming": json!({}),
                "script": "",
                "secretEnv": (),
                "status": "",
                "timeout": "",
                "timing": json!({}),
                "volumes": (json!({})),
                "waitFor": ()
            })
        ),
        "substitutions": json!({}),
        "tags": (),
        "timeout": "",
        "timing": json!({}),
        "warnings": (
            json!({
                "priority": "",
                "text": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/:parent/builds \
  --header 'content-type: application/json' \
  --data '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}'
echo '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/v1/:parent/builds \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "approval": {\n    "config": {\n      "approvalRequired": false\n    },\n    "result": {\n      "approvalTime": "",\n      "approverAccount": "",\n      "comment": "",\n      "decision": "",\n      "url": ""\n    },\n    "state": ""\n  },\n  "artifacts": {\n    "images": [],\n    "objects": {\n      "location": "",\n      "paths": [],\n      "timing": {\n        "endTime": "",\n        "startTime": ""\n      }\n    }\n  },\n  "availableSecrets": {\n    "inline": [\n      {\n        "envMap": {},\n        "kmsKeyName": ""\n      }\n    ],\n    "secretManager": [\n      {\n        "env": "",\n        "versionName": ""\n      }\n    ]\n  },\n  "buildTriggerId": "",\n  "createTime": "",\n  "failureInfo": {\n    "detail": "",\n    "type": ""\n  },\n  "finishTime": "",\n  "id": "",\n  "images": [],\n  "logUrl": "",\n  "logsBucket": "",\n  "name": "",\n  "options": {\n    "diskSizeGb": "",\n    "dynamicSubstitutions": false,\n    "env": [],\n    "logStreamingOption": "",\n    "logging": "",\n    "machineType": "",\n    "pool": {\n      "name": ""\n    },\n    "requestedVerifyOption": "",\n    "secretEnv": [],\n    "sourceProvenanceHash": [],\n    "substitutionOption": "",\n    "volumes": [\n      {\n        "name": "",\n        "path": ""\n      }\n    ],\n    "workerPool": ""\n  },\n  "projectId": "",\n  "queueTtl": "",\n  "results": {\n    "artifactManifest": "",\n    "artifactTiming": {},\n    "buildStepImages": [],\n    "buildStepOutputs": [],\n    "images": [\n      {\n        "digest": "",\n        "name": "",\n        "pushTiming": {}\n      }\n    ],\n    "numArtifacts": ""\n  },\n  "secrets": [\n    {\n      "kmsKeyName": "",\n      "secretEnv": {}\n    }\n  ],\n  "serviceAccount": "",\n  "source": {\n    "repoSource": {\n      "branchName": "",\n      "commitSha": "",\n      "dir": "",\n      "invertRegex": false,\n      "projectId": "",\n      "repoName": "",\n      "substitutions": {},\n      "tagName": ""\n    },\n    "storageSource": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    },\n    "storageSourceManifest": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    }\n  },\n  "sourceProvenance": {\n    "fileHashes": {},\n    "resolvedRepoSource": {},\n    "resolvedStorageSource": {},\n    "resolvedStorageSourceManifest": {}\n  },\n  "startTime": "",\n  "status": "",\n  "statusDetail": "",\n  "steps": [\n    {\n      "args": [],\n      "dir": "",\n      "entrypoint": "",\n      "env": [],\n      "id": "",\n      "name": "",\n      "pullTiming": {},\n      "script": "",\n      "secretEnv": [],\n      "status": "",\n      "timeout": "",\n      "timing": {},\n      "volumes": [\n        {}\n      ],\n      "waitFor": []\n    }\n  ],\n  "substitutions": {},\n  "tags": [],\n  "timeout": "",\n  "timing": {},\n  "warnings": [\n    {\n      "priority": "",\n      "text": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/v1/:parent/builds
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "approval": [
    "config": ["approvalRequired": false],
    "result": [
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    ],
    "state": ""
  ],
  "artifacts": [
    "images": [],
    "objects": [
      "location": "",
      "paths": [],
      "timing": [
        "endTime": "",
        "startTime": ""
      ]
    ]
  ],
  "availableSecrets": [
    "inline": [
      [
        "envMap": [],
        "kmsKeyName": ""
      ]
    ],
    "secretManager": [
      [
        "env": "",
        "versionName": ""
      ]
    ]
  ],
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": [
    "detail": "",
    "type": ""
  ],
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": [
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": ["name": ""],
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      [
        "name": "",
        "path": ""
      ]
    ],
    "workerPool": ""
  ],
  "projectId": "",
  "queueTtl": "",
  "results": [
    "artifactManifest": "",
    "artifactTiming": [],
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      [
        "digest": "",
        "name": "",
        "pushTiming": []
      ]
    ],
    "numArtifacts": ""
  ],
  "secrets": [
    [
      "kmsKeyName": "",
      "secretEnv": []
    ]
  ],
  "serviceAccount": "",
  "source": [
    "repoSource": [
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": [],
      "tagName": ""
    ],
    "storageSource": [
      "bucket": "",
      "generation": "",
      "object": ""
    ],
    "storageSourceManifest": [
      "bucket": "",
      "generation": "",
      "object": ""
    ]
  ],
  "sourceProvenance": [
    "fileHashes": [],
    "resolvedRepoSource": [],
    "resolvedStorageSource": [],
    "resolvedStorageSourceManifest": []
  ],
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    [
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": [],
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": [],
      "volumes": [[]],
      "waitFor": []
    ]
  ],
  "substitutions": [],
  "tags": [],
  "timeout": "",
  "timing": [],
  "warnings": [
    [
      "priority": "",
      "text": ""
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/builds")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).
{{baseUrl}}/v1/projects/:projectId/builds
QUERY PARAMS

projectId
BODY json

{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/builds");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/projects/:projectId/builds" {:content-type :json
                                                                          :form-params {:approval {:config {:approvalRequired false}
                                                                                                   :result {:approvalTime ""
                                                                                                            :approverAccount ""
                                                                                                            :comment ""
                                                                                                            :decision ""
                                                                                                            :url ""}
                                                                                                   :state ""}
                                                                                        :artifacts {:images []
                                                                                                    :objects {:location ""
                                                                                                              :paths []
                                                                                                              :timing {:endTime ""
                                                                                                                       :startTime ""}}}
                                                                                        :availableSecrets {:inline [{:envMap {}
                                                                                                                     :kmsKeyName ""}]
                                                                                                           :secretManager [{:env ""
                                                                                                                            :versionName ""}]}
                                                                                        :buildTriggerId ""
                                                                                        :createTime ""
                                                                                        :failureInfo {:detail ""
                                                                                                      :type ""}
                                                                                        :finishTime ""
                                                                                        :id ""
                                                                                        :images []
                                                                                        :logUrl ""
                                                                                        :logsBucket ""
                                                                                        :name ""
                                                                                        :options {:diskSizeGb ""
                                                                                                  :dynamicSubstitutions false
                                                                                                  :env []
                                                                                                  :logStreamingOption ""
                                                                                                  :logging ""
                                                                                                  :machineType ""
                                                                                                  :pool {:name ""}
                                                                                                  :requestedVerifyOption ""
                                                                                                  :secretEnv []
                                                                                                  :sourceProvenanceHash []
                                                                                                  :substitutionOption ""
                                                                                                  :volumes [{:name ""
                                                                                                             :path ""}]
                                                                                                  :workerPool ""}
                                                                                        :projectId ""
                                                                                        :queueTtl ""
                                                                                        :results {:artifactManifest ""
                                                                                                  :artifactTiming {}
                                                                                                  :buildStepImages []
                                                                                                  :buildStepOutputs []
                                                                                                  :images [{:digest ""
                                                                                                            :name ""
                                                                                                            :pushTiming {}}]
                                                                                                  :numArtifacts ""}
                                                                                        :secrets [{:kmsKeyName ""
                                                                                                   :secretEnv {}}]
                                                                                        :serviceAccount ""
                                                                                        :source {:repoSource {:branchName ""
                                                                                                              :commitSha ""
                                                                                                              :dir ""
                                                                                                              :invertRegex false
                                                                                                              :projectId ""
                                                                                                              :repoName ""
                                                                                                              :substitutions {}
                                                                                                              :tagName ""}
                                                                                                 :storageSource {:bucket ""
                                                                                                                 :generation ""
                                                                                                                 :object ""}
                                                                                                 :storageSourceManifest {:bucket ""
                                                                                                                         :generation ""
                                                                                                                         :object ""}}
                                                                                        :sourceProvenance {:fileHashes {}
                                                                                                           :resolvedRepoSource {}
                                                                                                           :resolvedStorageSource {}
                                                                                                           :resolvedStorageSourceManifest {}}
                                                                                        :startTime ""
                                                                                        :status ""
                                                                                        :statusDetail ""
                                                                                        :steps [{:args []
                                                                                                 :dir ""
                                                                                                 :entrypoint ""
                                                                                                 :env []
                                                                                                 :id ""
                                                                                                 :name ""
                                                                                                 :pullTiming {}
                                                                                                 :script ""
                                                                                                 :secretEnv []
                                                                                                 :status ""
                                                                                                 :timeout ""
                                                                                                 :timing {}
                                                                                                 :volumes [{}]
                                                                                                 :waitFor []}]
                                                                                        :substitutions {}
                                                                                        :tags []
                                                                                        :timeout ""
                                                                                        :timing {}
                                                                                        :warnings [{:priority ""
                                                                                                    :text ""}]}})
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/builds"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/builds"),
    Content = new StringContent("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/builds");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/builds"

	payload := strings.NewReader("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/projects/:projectId/builds HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2730

{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/projects/:projectId/builds")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/builds"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/projects/:projectId/builds")
  .header("content-type", "application/json")
  .body("{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  approval: {
    config: {
      approvalRequired: false
    },
    result: {
      approvalTime: '',
      approverAccount: '',
      comment: '',
      decision: '',
      url: ''
    },
    state: ''
  },
  artifacts: {
    images: [],
    objects: {
      location: '',
      paths: [],
      timing: {
        endTime: '',
        startTime: ''
      }
    }
  },
  availableSecrets: {
    inline: [
      {
        envMap: {},
        kmsKeyName: ''
      }
    ],
    secretManager: [
      {
        env: '',
        versionName: ''
      }
    ]
  },
  buildTriggerId: '',
  createTime: '',
  failureInfo: {
    detail: '',
    type: ''
  },
  finishTime: '',
  id: '',
  images: [],
  logUrl: '',
  logsBucket: '',
  name: '',
  options: {
    diskSizeGb: '',
    dynamicSubstitutions: false,
    env: [],
    logStreamingOption: '',
    logging: '',
    machineType: '',
    pool: {
      name: ''
    },
    requestedVerifyOption: '',
    secretEnv: [],
    sourceProvenanceHash: [],
    substitutionOption: '',
    volumes: [
      {
        name: '',
        path: ''
      }
    ],
    workerPool: ''
  },
  projectId: '',
  queueTtl: '',
  results: {
    artifactManifest: '',
    artifactTiming: {},
    buildStepImages: [],
    buildStepOutputs: [],
    images: [
      {
        digest: '',
        name: '',
        pushTiming: {}
      }
    ],
    numArtifacts: ''
  },
  secrets: [
    {
      kmsKeyName: '',
      secretEnv: {}
    }
  ],
  serviceAccount: '',
  source: {
    repoSource: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    storageSource: {
      bucket: '',
      generation: '',
      object: ''
    },
    storageSourceManifest: {
      bucket: '',
      generation: '',
      object: ''
    }
  },
  sourceProvenance: {
    fileHashes: {},
    resolvedRepoSource: {},
    resolvedStorageSource: {},
    resolvedStorageSourceManifest: {}
  },
  startTime: '',
  status: '',
  statusDetail: '',
  steps: [
    {
      args: [],
      dir: '',
      entrypoint: '',
      env: [],
      id: '',
      name: '',
      pullTiming: {},
      script: '',
      secretEnv: [],
      status: '',
      timeout: '',
      timing: {},
      volumes: [
        {}
      ],
      waitFor: []
    }
  ],
  substitutions: {},
  tags: [],
  timeout: '',
  timing: {},
  warnings: [
    {
      priority: '',
      text: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/projects/:projectId/builds');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/builds',
  headers: {'content-type': 'application/json'},
  data: {
    approval: {
      config: {approvalRequired: false},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/builds';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approval":{"config":{"approvalRequired":false},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/builds',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "approval": {\n    "config": {\n      "approvalRequired": false\n    },\n    "result": {\n      "approvalTime": "",\n      "approverAccount": "",\n      "comment": "",\n      "decision": "",\n      "url": ""\n    },\n    "state": ""\n  },\n  "artifacts": {\n    "images": [],\n    "objects": {\n      "location": "",\n      "paths": [],\n      "timing": {\n        "endTime": "",\n        "startTime": ""\n      }\n    }\n  },\n  "availableSecrets": {\n    "inline": [\n      {\n        "envMap": {},\n        "kmsKeyName": ""\n      }\n    ],\n    "secretManager": [\n      {\n        "env": "",\n        "versionName": ""\n      }\n    ]\n  },\n  "buildTriggerId": "",\n  "createTime": "",\n  "failureInfo": {\n    "detail": "",\n    "type": ""\n  },\n  "finishTime": "",\n  "id": "",\n  "images": [],\n  "logUrl": "",\n  "logsBucket": "",\n  "name": "",\n  "options": {\n    "diskSizeGb": "",\n    "dynamicSubstitutions": false,\n    "env": [],\n    "logStreamingOption": "",\n    "logging": "",\n    "machineType": "",\n    "pool": {\n      "name": ""\n    },\n    "requestedVerifyOption": "",\n    "secretEnv": [],\n    "sourceProvenanceHash": [],\n    "substitutionOption": "",\n    "volumes": [\n      {\n        "name": "",\n        "path": ""\n      }\n    ],\n    "workerPool": ""\n  },\n  "projectId": "",\n  "queueTtl": "",\n  "results": {\n    "artifactManifest": "",\n    "artifactTiming": {},\n    "buildStepImages": [],\n    "buildStepOutputs": [],\n    "images": [\n      {\n        "digest": "",\n        "name": "",\n        "pushTiming": {}\n      }\n    ],\n    "numArtifacts": ""\n  },\n  "secrets": [\n    {\n      "kmsKeyName": "",\n      "secretEnv": {}\n    }\n  ],\n  "serviceAccount": "",\n  "source": {\n    "repoSource": {\n      "branchName": "",\n      "commitSha": "",\n      "dir": "",\n      "invertRegex": false,\n      "projectId": "",\n      "repoName": "",\n      "substitutions": {},\n      "tagName": ""\n    },\n    "storageSource": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    },\n    "storageSourceManifest": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    }\n  },\n  "sourceProvenance": {\n    "fileHashes": {},\n    "resolvedRepoSource": {},\n    "resolvedStorageSource": {},\n    "resolvedStorageSourceManifest": {}\n  },\n  "startTime": "",\n  "status": "",\n  "statusDetail": "",\n  "steps": [\n    {\n      "args": [],\n      "dir": "",\n      "entrypoint": "",\n      "env": [],\n      "id": "",\n      "name": "",\n      "pullTiming": {},\n      "script": "",\n      "secretEnv": [],\n      "status": "",\n      "timeout": "",\n      "timing": {},\n      "volumes": [\n        {}\n      ],\n      "waitFor": []\n    }\n  ],\n  "substitutions": {},\n  "tags": [],\n  "timeout": "",\n  "timing": {},\n  "warnings": [\n    {\n      "priority": "",\n      "text": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/builds")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/builds',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  approval: {
    config: {approvalRequired: false},
    result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
    state: ''
  },
  artifacts: {
    images: [],
    objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
  },
  availableSecrets: {
    inline: [{envMap: {}, kmsKeyName: ''}],
    secretManager: [{env: '', versionName: ''}]
  },
  buildTriggerId: '',
  createTime: '',
  failureInfo: {detail: '', type: ''},
  finishTime: '',
  id: '',
  images: [],
  logUrl: '',
  logsBucket: '',
  name: '',
  options: {
    diskSizeGb: '',
    dynamicSubstitutions: false,
    env: [],
    logStreamingOption: '',
    logging: '',
    machineType: '',
    pool: {name: ''},
    requestedVerifyOption: '',
    secretEnv: [],
    sourceProvenanceHash: [],
    substitutionOption: '',
    volumes: [{name: '', path: ''}],
    workerPool: ''
  },
  projectId: '',
  queueTtl: '',
  results: {
    artifactManifest: '',
    artifactTiming: {},
    buildStepImages: [],
    buildStepOutputs: [],
    images: [{digest: '', name: '', pushTiming: {}}],
    numArtifacts: ''
  },
  secrets: [{kmsKeyName: '', secretEnv: {}}],
  serviceAccount: '',
  source: {
    repoSource: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    storageSource: {bucket: '', generation: '', object: ''},
    storageSourceManifest: {bucket: '', generation: '', object: ''}
  },
  sourceProvenance: {
    fileHashes: {},
    resolvedRepoSource: {},
    resolvedStorageSource: {},
    resolvedStorageSourceManifest: {}
  },
  startTime: '',
  status: '',
  statusDetail: '',
  steps: [
    {
      args: [],
      dir: '',
      entrypoint: '',
      env: [],
      id: '',
      name: '',
      pullTiming: {},
      script: '',
      secretEnv: [],
      status: '',
      timeout: '',
      timing: {},
      volumes: [{}],
      waitFor: []
    }
  ],
  substitutions: {},
  tags: [],
  timeout: '',
  timing: {},
  warnings: [{priority: '', text: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/builds',
  headers: {'content-type': 'application/json'},
  body: {
    approval: {
      config: {approvalRequired: false},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/projects/:projectId/builds');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  approval: {
    config: {
      approvalRequired: false
    },
    result: {
      approvalTime: '',
      approverAccount: '',
      comment: '',
      decision: '',
      url: ''
    },
    state: ''
  },
  artifacts: {
    images: [],
    objects: {
      location: '',
      paths: [],
      timing: {
        endTime: '',
        startTime: ''
      }
    }
  },
  availableSecrets: {
    inline: [
      {
        envMap: {},
        kmsKeyName: ''
      }
    ],
    secretManager: [
      {
        env: '',
        versionName: ''
      }
    ]
  },
  buildTriggerId: '',
  createTime: '',
  failureInfo: {
    detail: '',
    type: ''
  },
  finishTime: '',
  id: '',
  images: [],
  logUrl: '',
  logsBucket: '',
  name: '',
  options: {
    diskSizeGb: '',
    dynamicSubstitutions: false,
    env: [],
    logStreamingOption: '',
    logging: '',
    machineType: '',
    pool: {
      name: ''
    },
    requestedVerifyOption: '',
    secretEnv: [],
    sourceProvenanceHash: [],
    substitutionOption: '',
    volumes: [
      {
        name: '',
        path: ''
      }
    ],
    workerPool: ''
  },
  projectId: '',
  queueTtl: '',
  results: {
    artifactManifest: '',
    artifactTiming: {},
    buildStepImages: [],
    buildStepOutputs: [],
    images: [
      {
        digest: '',
        name: '',
        pushTiming: {}
      }
    ],
    numArtifacts: ''
  },
  secrets: [
    {
      kmsKeyName: '',
      secretEnv: {}
    }
  ],
  serviceAccount: '',
  source: {
    repoSource: {
      branchName: '',
      commitSha: '',
      dir: '',
      invertRegex: false,
      projectId: '',
      repoName: '',
      substitutions: {},
      tagName: ''
    },
    storageSource: {
      bucket: '',
      generation: '',
      object: ''
    },
    storageSourceManifest: {
      bucket: '',
      generation: '',
      object: ''
    }
  },
  sourceProvenance: {
    fileHashes: {},
    resolvedRepoSource: {},
    resolvedStorageSource: {},
    resolvedStorageSourceManifest: {}
  },
  startTime: '',
  status: '',
  statusDetail: '',
  steps: [
    {
      args: [],
      dir: '',
      entrypoint: '',
      env: [],
      id: '',
      name: '',
      pullTiming: {},
      script: '',
      secretEnv: [],
      status: '',
      timeout: '',
      timing: {},
      volumes: [
        {}
      ],
      waitFor: []
    }
  ],
  substitutions: {},
  tags: [],
  timeout: '',
  timing: {},
  warnings: [
    {
      priority: '',
      text: ''
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/projects/:projectId/builds',
  headers: {'content-type': 'application/json'},
  data: {
    approval: {
      config: {approvalRequired: false},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/builds';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"approval":{"config":{"approvalRequired":false},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"approval": @{ @"config": @{ @"approvalRequired": @NO }, @"result": @{ @"approvalTime": @"", @"approverAccount": @"", @"comment": @"", @"decision": @"", @"url": @"" }, @"state": @"" },
                              @"artifacts": @{ @"images": @[  ], @"objects": @{ @"location": @"", @"paths": @[  ], @"timing": @{ @"endTime": @"", @"startTime": @"" } } },
                              @"availableSecrets": @{ @"inline": @[ @{ @"envMap": @{  }, @"kmsKeyName": @"" } ], @"secretManager": @[ @{ @"env": @"", @"versionName": @"" } ] },
                              @"buildTriggerId": @"",
                              @"createTime": @"",
                              @"failureInfo": @{ @"detail": @"", @"type": @"" },
                              @"finishTime": @"",
                              @"id": @"",
                              @"images": @[  ],
                              @"logUrl": @"",
                              @"logsBucket": @"",
                              @"name": @"",
                              @"options": @{ @"diskSizeGb": @"", @"dynamicSubstitutions": @NO, @"env": @[  ], @"logStreamingOption": @"", @"logging": @"", @"machineType": @"", @"pool": @{ @"name": @"" }, @"requestedVerifyOption": @"", @"secretEnv": @[  ], @"sourceProvenanceHash": @[  ], @"substitutionOption": @"", @"volumes": @[ @{ @"name": @"", @"path": @"" } ], @"workerPool": @"" },
                              @"projectId": @"",
                              @"queueTtl": @"",
                              @"results": @{ @"artifactManifest": @"", @"artifactTiming": @{  }, @"buildStepImages": @[  ], @"buildStepOutputs": @[  ], @"images": @[ @{ @"digest": @"", @"name": @"", @"pushTiming": @{  } } ], @"numArtifacts": @"" },
                              @"secrets": @[ @{ @"kmsKeyName": @"", @"secretEnv": @{  } } ],
                              @"serviceAccount": @"",
                              @"source": @{ @"repoSource": @{ @"branchName": @"", @"commitSha": @"", @"dir": @"", @"invertRegex": @NO, @"projectId": @"", @"repoName": @"", @"substitutions": @{  }, @"tagName": @"" }, @"storageSource": @{ @"bucket": @"", @"generation": @"", @"object": @"" }, @"storageSourceManifest": @{ @"bucket": @"", @"generation": @"", @"object": @"" } },
                              @"sourceProvenance": @{ @"fileHashes": @{  }, @"resolvedRepoSource": @{  }, @"resolvedStorageSource": @{  }, @"resolvedStorageSourceManifest": @{  } },
                              @"startTime": @"",
                              @"status": @"",
                              @"statusDetail": @"",
                              @"steps": @[ @{ @"args": @[  ], @"dir": @"", @"entrypoint": @"", @"env": @[  ], @"id": @"", @"name": @"", @"pullTiming": @{  }, @"script": @"", @"secretEnv": @[  ], @"status": @"", @"timeout": @"", @"timing": @{  }, @"volumes": @[ @{  } ], @"waitFor": @[  ] } ],
                              @"substitutions": @{  },
                              @"tags": @[  ],
                              @"timeout": @"",
                              @"timing": @{  },
                              @"warnings": @[ @{ @"priority": @"", @"text": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/builds"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/builds" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/builds",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'approval' => [
        'config' => [
                'approvalRequired' => null
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/projects/:projectId/builds', [
  'body' => '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/builds');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'approval' => [
    'config' => [
        'approvalRequired' => null
    ],
    'result' => [
        'approvalTime' => '',
        'approverAccount' => '',
        'comment' => '',
        'decision' => '',
        'url' => ''
    ],
    'state' => ''
  ],
  'artifacts' => [
    'images' => [
        
    ],
    'objects' => [
        'location' => '',
        'paths' => [
                
        ],
        'timing' => [
                'endTime' => '',
                'startTime' => ''
        ]
    ]
  ],
  'availableSecrets' => [
    'inline' => [
        [
                'envMap' => [
                                
                ],
                'kmsKeyName' => ''
        ]
    ],
    'secretManager' => [
        [
                'env' => '',
                'versionName' => ''
        ]
    ]
  ],
  'buildTriggerId' => '',
  'createTime' => '',
  'failureInfo' => [
    'detail' => '',
    'type' => ''
  ],
  'finishTime' => '',
  'id' => '',
  'images' => [
    
  ],
  'logUrl' => '',
  'logsBucket' => '',
  'name' => '',
  'options' => [
    'diskSizeGb' => '',
    'dynamicSubstitutions' => null,
    'env' => [
        
    ],
    'logStreamingOption' => '',
    'logging' => '',
    'machineType' => '',
    'pool' => [
        'name' => ''
    ],
    'requestedVerifyOption' => '',
    'secretEnv' => [
        
    ],
    'sourceProvenanceHash' => [
        
    ],
    'substitutionOption' => '',
    'volumes' => [
        [
                'name' => '',
                'path' => ''
        ]
    ],
    'workerPool' => ''
  ],
  'projectId' => '',
  'queueTtl' => '',
  'results' => [
    'artifactManifest' => '',
    'artifactTiming' => [
        
    ],
    'buildStepImages' => [
        
    ],
    'buildStepOutputs' => [
        
    ],
    'images' => [
        [
                'digest' => '',
                'name' => '',
                'pushTiming' => [
                                
                ]
        ]
    ],
    'numArtifacts' => ''
  ],
  'secrets' => [
    [
        'kmsKeyName' => '',
        'secretEnv' => [
                
        ]
    ]
  ],
  'serviceAccount' => '',
  'source' => [
    'repoSource' => [
        'branchName' => '',
        'commitSha' => '',
        'dir' => '',
        'invertRegex' => null,
        'projectId' => '',
        'repoName' => '',
        'substitutions' => [
                
        ],
        'tagName' => ''
    ],
    'storageSource' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ],
    'storageSourceManifest' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ]
  ],
  'sourceProvenance' => [
    'fileHashes' => [
        
    ],
    'resolvedRepoSource' => [
        
    ],
    'resolvedStorageSource' => [
        
    ],
    'resolvedStorageSourceManifest' => [
        
    ]
  ],
  'startTime' => '',
  'status' => '',
  'statusDetail' => '',
  'steps' => [
    [
        'args' => [
                
        ],
        'dir' => '',
        'entrypoint' => '',
        'env' => [
                
        ],
        'id' => '',
        'name' => '',
        'pullTiming' => [
                
        ],
        'script' => '',
        'secretEnv' => [
                
        ],
        'status' => '',
        'timeout' => '',
        'timing' => [
                
        ],
        'volumes' => [
                [
                                
                ]
        ],
        'waitFor' => [
                
        ]
    ]
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'timeout' => '',
  'timing' => [
    
  ],
  'warnings' => [
    [
        'priority' => '',
        'text' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'approval' => [
    'config' => [
        'approvalRequired' => null
    ],
    'result' => [
        'approvalTime' => '',
        'approverAccount' => '',
        'comment' => '',
        'decision' => '',
        'url' => ''
    ],
    'state' => ''
  ],
  'artifacts' => [
    'images' => [
        
    ],
    'objects' => [
        'location' => '',
        'paths' => [
                
        ],
        'timing' => [
                'endTime' => '',
                'startTime' => ''
        ]
    ]
  ],
  'availableSecrets' => [
    'inline' => [
        [
                'envMap' => [
                                
                ],
                'kmsKeyName' => ''
        ]
    ],
    'secretManager' => [
        [
                'env' => '',
                'versionName' => ''
        ]
    ]
  ],
  'buildTriggerId' => '',
  'createTime' => '',
  'failureInfo' => [
    'detail' => '',
    'type' => ''
  ],
  'finishTime' => '',
  'id' => '',
  'images' => [
    
  ],
  'logUrl' => '',
  'logsBucket' => '',
  'name' => '',
  'options' => [
    'diskSizeGb' => '',
    'dynamicSubstitutions' => null,
    'env' => [
        
    ],
    'logStreamingOption' => '',
    'logging' => '',
    'machineType' => '',
    'pool' => [
        'name' => ''
    ],
    'requestedVerifyOption' => '',
    'secretEnv' => [
        
    ],
    'sourceProvenanceHash' => [
        
    ],
    'substitutionOption' => '',
    'volumes' => [
        [
                'name' => '',
                'path' => ''
        ]
    ],
    'workerPool' => ''
  ],
  'projectId' => '',
  'queueTtl' => '',
  'results' => [
    'artifactManifest' => '',
    'artifactTiming' => [
        
    ],
    'buildStepImages' => [
        
    ],
    'buildStepOutputs' => [
        
    ],
    'images' => [
        [
                'digest' => '',
                'name' => '',
                'pushTiming' => [
                                
                ]
        ]
    ],
    'numArtifacts' => ''
  ],
  'secrets' => [
    [
        'kmsKeyName' => '',
        'secretEnv' => [
                
        ]
    ]
  ],
  'serviceAccount' => '',
  'source' => [
    'repoSource' => [
        'branchName' => '',
        'commitSha' => '',
        'dir' => '',
        'invertRegex' => null,
        'projectId' => '',
        'repoName' => '',
        'substitutions' => [
                
        ],
        'tagName' => ''
    ],
    'storageSource' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ],
    'storageSourceManifest' => [
        'bucket' => '',
        'generation' => '',
        'object' => ''
    ]
  ],
  'sourceProvenance' => [
    'fileHashes' => [
        
    ],
    'resolvedRepoSource' => [
        
    ],
    'resolvedStorageSource' => [
        
    ],
    'resolvedStorageSourceManifest' => [
        
    ]
  ],
  'startTime' => '',
  'status' => '',
  'statusDetail' => '',
  'steps' => [
    [
        'args' => [
                
        ],
        'dir' => '',
        'entrypoint' => '',
        'env' => [
                
        ],
        'id' => '',
        'name' => '',
        'pullTiming' => [
                
        ],
        'script' => '',
        'secretEnv' => [
                
        ],
        'status' => '',
        'timeout' => '',
        'timing' => [
                
        ],
        'volumes' => [
                [
                                
                ]
        ],
        'waitFor' => [
                
        ]
    ]
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'timeout' => '',
  'timing' => [
    
  ],
  'warnings' => [
    [
        'priority' => '',
        'text' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/projects/:projectId/builds');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/builds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/builds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/projects/:projectId/builds", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/builds"

payload = {
    "approval": {
        "config": { "approvalRequired": False },
        "result": {
            "approvalTime": "",
            "approverAccount": "",
            "comment": "",
            "decision": "",
            "url": ""
        },
        "state": ""
    },
    "artifacts": {
        "images": [],
        "objects": {
            "location": "",
            "paths": [],
            "timing": {
                "endTime": "",
                "startTime": ""
            }
        }
    },
    "availableSecrets": {
        "inline": [
            {
                "envMap": {},
                "kmsKeyName": ""
            }
        ],
        "secretManager": [
            {
                "env": "",
                "versionName": ""
            }
        ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
        "detail": "",
        "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
        "diskSizeGb": "",
        "dynamicSubstitutions": False,
        "env": [],
        "logStreamingOption": "",
        "logging": "",
        "machineType": "",
        "pool": { "name": "" },
        "requestedVerifyOption": "",
        "secretEnv": [],
        "sourceProvenanceHash": [],
        "substitutionOption": "",
        "volumes": [
            {
                "name": "",
                "path": ""
            }
        ],
        "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
        "artifactManifest": "",
        "artifactTiming": {},
        "buildStepImages": [],
        "buildStepOutputs": [],
        "images": [
            {
                "digest": "",
                "name": "",
                "pushTiming": {}
            }
        ],
        "numArtifacts": ""
    },
    "secrets": [
        {
            "kmsKeyName": "",
            "secretEnv": {}
        }
    ],
    "serviceAccount": "",
    "source": {
        "repoSource": {
            "branchName": "",
            "commitSha": "",
            "dir": "",
            "invertRegex": False,
            "projectId": "",
            "repoName": "",
            "substitutions": {},
            "tagName": ""
        },
        "storageSource": {
            "bucket": "",
            "generation": "",
            "object": ""
        },
        "storageSourceManifest": {
            "bucket": "",
            "generation": "",
            "object": ""
        }
    },
    "sourceProvenance": {
        "fileHashes": {},
        "resolvedRepoSource": {},
        "resolvedStorageSource": {},
        "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
        {
            "args": [],
            "dir": "",
            "entrypoint": "",
            "env": [],
            "id": "",
            "name": "",
            "pullTiming": {},
            "script": "",
            "secretEnv": [],
            "status": "",
            "timeout": "",
            "timing": {},
            "volumes": [{}],
            "waitFor": []
        }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
        {
            "priority": "",
            "text": ""
        }
    ]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/builds"

payload <- "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/builds")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/projects/:projectId/builds') do |req|
  req.body = "{\n  \"approval\": {\n    \"config\": {\n      \"approvalRequired\": false\n    },\n    \"result\": {\n      \"approvalTime\": \"\",\n      \"approverAccount\": \"\",\n      \"comment\": \"\",\n      \"decision\": \"\",\n      \"url\": \"\"\n    },\n    \"state\": \"\"\n  },\n  \"artifacts\": {\n    \"images\": [],\n    \"objects\": {\n      \"location\": \"\",\n      \"paths\": [],\n      \"timing\": {\n        \"endTime\": \"\",\n        \"startTime\": \"\"\n      }\n    }\n  },\n  \"availableSecrets\": {\n    \"inline\": [\n      {\n        \"envMap\": {},\n        \"kmsKeyName\": \"\"\n      }\n    ],\n    \"secretManager\": [\n      {\n        \"env\": \"\",\n        \"versionName\": \"\"\n      }\n    ]\n  },\n  \"buildTriggerId\": \"\",\n  \"createTime\": \"\",\n  \"failureInfo\": {\n    \"detail\": \"\",\n    \"type\": \"\"\n  },\n  \"finishTime\": \"\",\n  \"id\": \"\",\n  \"images\": [],\n  \"logUrl\": \"\",\n  \"logsBucket\": \"\",\n  \"name\": \"\",\n  \"options\": {\n    \"diskSizeGb\": \"\",\n    \"dynamicSubstitutions\": false,\n    \"env\": [],\n    \"logStreamingOption\": \"\",\n    \"logging\": \"\",\n    \"machineType\": \"\",\n    \"pool\": {\n      \"name\": \"\"\n    },\n    \"requestedVerifyOption\": \"\",\n    \"secretEnv\": [],\n    \"sourceProvenanceHash\": [],\n    \"substitutionOption\": \"\",\n    \"volumes\": [\n      {\n        \"name\": \"\",\n        \"path\": \"\"\n      }\n    ],\n    \"workerPool\": \"\"\n  },\n  \"projectId\": \"\",\n  \"queueTtl\": \"\",\n  \"results\": {\n    \"artifactManifest\": \"\",\n    \"artifactTiming\": {},\n    \"buildStepImages\": [],\n    \"buildStepOutputs\": [],\n    \"images\": [\n      {\n        \"digest\": \"\",\n        \"name\": \"\",\n        \"pushTiming\": {}\n      }\n    ],\n    \"numArtifacts\": \"\"\n  },\n  \"secrets\": [\n    {\n      \"kmsKeyName\": \"\",\n      \"secretEnv\": {}\n    }\n  ],\n  \"serviceAccount\": \"\",\n  \"source\": {\n    \"repoSource\": {\n      \"branchName\": \"\",\n      \"commitSha\": \"\",\n      \"dir\": \"\",\n      \"invertRegex\": false,\n      \"projectId\": \"\",\n      \"repoName\": \"\",\n      \"substitutions\": {},\n      \"tagName\": \"\"\n    },\n    \"storageSource\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    },\n    \"storageSourceManifest\": {\n      \"bucket\": \"\",\n      \"generation\": \"\",\n      \"object\": \"\"\n    }\n  },\n  \"sourceProvenance\": {\n    \"fileHashes\": {},\n    \"resolvedRepoSource\": {},\n    \"resolvedStorageSource\": {},\n    \"resolvedStorageSourceManifest\": {}\n  },\n  \"startTime\": \"\",\n  \"status\": \"\",\n  \"statusDetail\": \"\",\n  \"steps\": [\n    {\n      \"args\": [],\n      \"dir\": \"\",\n      \"entrypoint\": \"\",\n      \"env\": [],\n      \"id\": \"\",\n      \"name\": \"\",\n      \"pullTiming\": {},\n      \"script\": \"\",\n      \"secretEnv\": [],\n      \"status\": \"\",\n      \"timeout\": \"\",\n      \"timing\": {},\n      \"volumes\": [\n        {}\n      ],\n      \"waitFor\": []\n    }\n  ],\n  \"substitutions\": {},\n  \"tags\": [],\n  \"timeout\": \"\",\n  \"timing\": {},\n  \"warnings\": [\n    {\n      \"priority\": \"\",\n      \"text\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/builds";

    let payload = json!({
        "approval": json!({
            "config": json!({"approvalRequired": false}),
            "result": json!({
                "approvalTime": "",
                "approverAccount": "",
                "comment": "",
                "decision": "",
                "url": ""
            }),
            "state": ""
        }),
        "artifacts": json!({
            "images": (),
            "objects": json!({
                "location": "",
                "paths": (),
                "timing": json!({
                    "endTime": "",
                    "startTime": ""
                })
            })
        }),
        "availableSecrets": json!({
            "inline": (
                json!({
                    "envMap": json!({}),
                    "kmsKeyName": ""
                })
            ),
            "secretManager": (
                json!({
                    "env": "",
                    "versionName": ""
                })
            )
        }),
        "buildTriggerId": "",
        "createTime": "",
        "failureInfo": json!({
            "detail": "",
            "type": ""
        }),
        "finishTime": "",
        "id": "",
        "images": (),
        "logUrl": "",
        "logsBucket": "",
        "name": "",
        "options": json!({
            "diskSizeGb": "",
            "dynamicSubstitutions": false,
            "env": (),
            "logStreamingOption": "",
            "logging": "",
            "machineType": "",
            "pool": json!({"name": ""}),
            "requestedVerifyOption": "",
            "secretEnv": (),
            "sourceProvenanceHash": (),
            "substitutionOption": "",
            "volumes": (
                json!({
                    "name": "",
                    "path": ""
                })
            ),
            "workerPool": ""
        }),
        "projectId": "",
        "queueTtl": "",
        "results": json!({
            "artifactManifest": "",
            "artifactTiming": json!({}),
            "buildStepImages": (),
            "buildStepOutputs": (),
            "images": (
                json!({
                    "digest": "",
                    "name": "",
                    "pushTiming": json!({})
                })
            ),
            "numArtifacts": ""
        }),
        "secrets": (
            json!({
                "kmsKeyName": "",
                "secretEnv": json!({})
            })
        ),
        "serviceAccount": "",
        "source": json!({
            "repoSource": json!({
                "branchName": "",
                "commitSha": "",
                "dir": "",
                "invertRegex": false,
                "projectId": "",
                "repoName": "",
                "substitutions": json!({}),
                "tagName": ""
            }),
            "storageSource": json!({
                "bucket": "",
                "generation": "",
                "object": ""
            }),
            "storageSourceManifest": json!({
                "bucket": "",
                "generation": "",
                "object": ""
            })
        }),
        "sourceProvenance": json!({
            "fileHashes": json!({}),
            "resolvedRepoSource": json!({}),
            "resolvedStorageSource": json!({}),
            "resolvedStorageSourceManifest": json!({})
        }),
        "startTime": "",
        "status": "",
        "statusDetail": "",
        "steps": (
            json!({
                "args": (),
                "dir": "",
                "entrypoint": "",
                "env": (),
                "id": "",
                "name": "",
                "pullTiming": json!({}),
                "script": "",
                "secretEnv": (),
                "status": "",
                "timeout": "",
                "timing": json!({}),
                "volumes": (json!({})),
                "waitFor": ()
            })
        ),
        "substitutions": json!({}),
        "tags": (),
        "timeout": "",
        "timing": json!({}),
        "warnings": (
            json!({
                "priority": "",
                "text": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/projects/:projectId/builds \
  --header 'content-type: application/json' \
  --data '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}'
echo '{
  "approval": {
    "config": {
      "approvalRequired": false
    },
    "result": {
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    },
    "state": ""
  },
  "artifacts": {
    "images": [],
    "objects": {
      "location": "",
      "paths": [],
      "timing": {
        "endTime": "",
        "startTime": ""
      }
    }
  },
  "availableSecrets": {
    "inline": [
      {
        "envMap": {},
        "kmsKeyName": ""
      }
    ],
    "secretManager": [
      {
        "env": "",
        "versionName": ""
      }
    ]
  },
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": {
    "detail": "",
    "type": ""
  },
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": {
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": {
      "name": ""
    },
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      {
        "name": "",
        "path": ""
      }
    ],
    "workerPool": ""
  },
  "projectId": "",
  "queueTtl": "",
  "results": {
    "artifactManifest": "",
    "artifactTiming": {},
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      {
        "digest": "",
        "name": "",
        "pushTiming": {}
      }
    ],
    "numArtifacts": ""
  },
  "secrets": [
    {
      "kmsKeyName": "",
      "secretEnv": {}
    }
  ],
  "serviceAccount": "",
  "source": {
    "repoSource": {
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": {},
      "tagName": ""
    },
    "storageSource": {
      "bucket": "",
      "generation": "",
      "object": ""
    },
    "storageSourceManifest": {
      "bucket": "",
      "generation": "",
      "object": ""
    }
  },
  "sourceProvenance": {
    "fileHashes": {},
    "resolvedRepoSource": {},
    "resolvedStorageSource": {},
    "resolvedStorageSourceManifest": {}
  },
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    {
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": {},
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": {},
      "volumes": [
        {}
      ],
      "waitFor": []
    }
  ],
  "substitutions": {},
  "tags": [],
  "timeout": "",
  "timing": {},
  "warnings": [
    {
      "priority": "",
      "text": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/v1/projects/:projectId/builds \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "approval": {\n    "config": {\n      "approvalRequired": false\n    },\n    "result": {\n      "approvalTime": "",\n      "approverAccount": "",\n      "comment": "",\n      "decision": "",\n      "url": ""\n    },\n    "state": ""\n  },\n  "artifacts": {\n    "images": [],\n    "objects": {\n      "location": "",\n      "paths": [],\n      "timing": {\n        "endTime": "",\n        "startTime": ""\n      }\n    }\n  },\n  "availableSecrets": {\n    "inline": [\n      {\n        "envMap": {},\n        "kmsKeyName": ""\n      }\n    ],\n    "secretManager": [\n      {\n        "env": "",\n        "versionName": ""\n      }\n    ]\n  },\n  "buildTriggerId": "",\n  "createTime": "",\n  "failureInfo": {\n    "detail": "",\n    "type": ""\n  },\n  "finishTime": "",\n  "id": "",\n  "images": [],\n  "logUrl": "",\n  "logsBucket": "",\n  "name": "",\n  "options": {\n    "diskSizeGb": "",\n    "dynamicSubstitutions": false,\n    "env": [],\n    "logStreamingOption": "",\n    "logging": "",\n    "machineType": "",\n    "pool": {\n      "name": ""\n    },\n    "requestedVerifyOption": "",\n    "secretEnv": [],\n    "sourceProvenanceHash": [],\n    "substitutionOption": "",\n    "volumes": [\n      {\n        "name": "",\n        "path": ""\n      }\n    ],\n    "workerPool": ""\n  },\n  "projectId": "",\n  "queueTtl": "",\n  "results": {\n    "artifactManifest": "",\n    "artifactTiming": {},\n    "buildStepImages": [],\n    "buildStepOutputs": [],\n    "images": [\n      {\n        "digest": "",\n        "name": "",\n        "pushTiming": {}\n      }\n    ],\n    "numArtifacts": ""\n  },\n  "secrets": [\n    {\n      "kmsKeyName": "",\n      "secretEnv": {}\n    }\n  ],\n  "serviceAccount": "",\n  "source": {\n    "repoSource": {\n      "branchName": "",\n      "commitSha": "",\n      "dir": "",\n      "invertRegex": false,\n      "projectId": "",\n      "repoName": "",\n      "substitutions": {},\n      "tagName": ""\n    },\n    "storageSource": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    },\n    "storageSourceManifest": {\n      "bucket": "",\n      "generation": "",\n      "object": ""\n    }\n  },\n  "sourceProvenance": {\n    "fileHashes": {},\n    "resolvedRepoSource": {},\n    "resolvedStorageSource": {},\n    "resolvedStorageSourceManifest": {}\n  },\n  "startTime": "",\n  "status": "",\n  "statusDetail": "",\n  "steps": [\n    {\n      "args": [],\n      "dir": "",\n      "entrypoint": "",\n      "env": [],\n      "id": "",\n      "name": "",\n      "pullTiming": {},\n      "script": "",\n      "secretEnv": [],\n      "status": "",\n      "timeout": "",\n      "timing": {},\n      "volumes": [\n        {}\n      ],\n      "waitFor": []\n    }\n  ],\n  "substitutions": {},\n  "tags": [],\n  "timeout": "",\n  "timing": {},\n  "warnings": [\n    {\n      "priority": "",\n      "text": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/builds
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "approval": [
    "config": ["approvalRequired": false],
    "result": [
      "approvalTime": "",
      "approverAccount": "",
      "comment": "",
      "decision": "",
      "url": ""
    ],
    "state": ""
  ],
  "artifacts": [
    "images": [],
    "objects": [
      "location": "",
      "paths": [],
      "timing": [
        "endTime": "",
        "startTime": ""
      ]
    ]
  ],
  "availableSecrets": [
    "inline": [
      [
        "envMap": [],
        "kmsKeyName": ""
      ]
    ],
    "secretManager": [
      [
        "env": "",
        "versionName": ""
      ]
    ]
  ],
  "buildTriggerId": "",
  "createTime": "",
  "failureInfo": [
    "detail": "",
    "type": ""
  ],
  "finishTime": "",
  "id": "",
  "images": [],
  "logUrl": "",
  "logsBucket": "",
  "name": "",
  "options": [
    "diskSizeGb": "",
    "dynamicSubstitutions": false,
    "env": [],
    "logStreamingOption": "",
    "logging": "",
    "machineType": "",
    "pool": ["name": ""],
    "requestedVerifyOption": "",
    "secretEnv": [],
    "sourceProvenanceHash": [],
    "substitutionOption": "",
    "volumes": [
      [
        "name": "",
        "path": ""
      ]
    ],
    "workerPool": ""
  ],
  "projectId": "",
  "queueTtl": "",
  "results": [
    "artifactManifest": "",
    "artifactTiming": [],
    "buildStepImages": [],
    "buildStepOutputs": [],
    "images": [
      [
        "digest": "",
        "name": "",
        "pushTiming": []
      ]
    ],
    "numArtifacts": ""
  ],
  "secrets": [
    [
      "kmsKeyName": "",
      "secretEnv": []
    ]
  ],
  "serviceAccount": "",
  "source": [
    "repoSource": [
      "branchName": "",
      "commitSha": "",
      "dir": "",
      "invertRegex": false,
      "projectId": "",
      "repoName": "",
      "substitutions": [],
      "tagName": ""
    ],
    "storageSource": [
      "bucket": "",
      "generation": "",
      "object": ""
    ],
    "storageSourceManifest": [
      "bucket": "",
      "generation": "",
      "object": ""
    ]
  ],
  "sourceProvenance": [
    "fileHashes": [],
    "resolvedRepoSource": [],
    "resolvedStorageSource": [],
    "resolvedStorageSourceManifest": []
  ],
  "startTime": "",
  "status": "",
  "statusDetail": "",
  "steps": [
    [
      "args": [],
      "dir": "",
      "entrypoint": "",
      "env": [],
      "id": "",
      "name": "",
      "pullTiming": [],
      "script": "",
      "secretEnv": [],
      "status": "",
      "timeout": "",
      "timing": [],
      "volumes": [[]],
      "waitFor": []
    ]
  ],
  "substitutions": [],
  "tags": [],
  "timeout": "",
  "timing": [],
  "warnings": [
    [
      "priority": "",
      "text": ""
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/builds")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
PATCH Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental. (PATCH)
{{baseUrl}}/v1/:resourceName
QUERY PARAMS

resourceName
BODY json

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:resourceName");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1/:resourceName" {:content-type :json
                                                              :form-params {:approvalConfig {:approvalRequired false}
                                                                            :autodetect false
                                                                            :build {:approval {:config {}
                                                                                               :result {:approvalTime ""
                                                                                                        :approverAccount ""
                                                                                                        :comment ""
                                                                                                        :decision ""
                                                                                                        :url ""}
                                                                                               :state ""}
                                                                                    :artifacts {:images []
                                                                                                :objects {:location ""
                                                                                                          :paths []
                                                                                                          :timing {:endTime ""
                                                                                                                   :startTime ""}}}
                                                                                    :availableSecrets {:inline [{:envMap {}
                                                                                                                 :kmsKeyName ""}]
                                                                                                       :secretManager [{:env ""
                                                                                                                        :versionName ""}]}
                                                                                    :buildTriggerId ""
                                                                                    :createTime ""
                                                                                    :failureInfo {:detail ""
                                                                                                  :type ""}
                                                                                    :finishTime ""
                                                                                    :id ""
                                                                                    :images []
                                                                                    :logUrl ""
                                                                                    :logsBucket ""
                                                                                    :name ""
                                                                                    :options {:diskSizeGb ""
                                                                                              :dynamicSubstitutions false
                                                                                              :env []
                                                                                              :logStreamingOption ""
                                                                                              :logging ""
                                                                                              :machineType ""
                                                                                              :pool {:name ""}
                                                                                              :requestedVerifyOption ""
                                                                                              :secretEnv []
                                                                                              :sourceProvenanceHash []
                                                                                              :substitutionOption ""
                                                                                              :volumes [{:name ""
                                                                                                         :path ""}]
                                                                                              :workerPool ""}
                                                                                    :projectId ""
                                                                                    :queueTtl ""
                                                                                    :results {:artifactManifest ""
                                                                                              :artifactTiming {}
                                                                                              :buildStepImages []
                                                                                              :buildStepOutputs []
                                                                                              :images [{:digest ""
                                                                                                        :name ""
                                                                                                        :pushTiming {}}]
                                                                                              :numArtifacts ""}
                                                                                    :secrets [{:kmsKeyName ""
                                                                                               :secretEnv {}}]
                                                                                    :serviceAccount ""
                                                                                    :source {:repoSource {:branchName ""
                                                                                                          :commitSha ""
                                                                                                          :dir ""
                                                                                                          :invertRegex false
                                                                                                          :projectId ""
                                                                                                          :repoName ""
                                                                                                          :substitutions {}
                                                                                                          :tagName ""}
                                                                                             :storageSource {:bucket ""
                                                                                                             :generation ""
                                                                                                             :object ""}
                                                                                             :storageSourceManifest {:bucket ""
                                                                                                                     :generation ""
                                                                                                                     :object ""}}
                                                                                    :sourceProvenance {:fileHashes {}
                                                                                                       :resolvedRepoSource {}
                                                                                                       :resolvedStorageSource {}
                                                                                                       :resolvedStorageSourceManifest {}}
                                                                                    :startTime ""
                                                                                    :status ""
                                                                                    :statusDetail ""
                                                                                    :steps [{:args []
                                                                                             :dir ""
                                                                                             :entrypoint ""
                                                                                             :env []
                                                                                             :id ""
                                                                                             :name ""
                                                                                             :pullTiming {}
                                                                                             :script ""
                                                                                             :secretEnv []
                                                                                             :status ""
                                                                                             :timeout ""
                                                                                             :timing {}
                                                                                             :volumes [{}]
                                                                                             :waitFor []}]
                                                                                    :substitutions {}
                                                                                    :tags []
                                                                                    :timeout ""
                                                                                    :timing {}
                                                                                    :warnings [{:priority ""
                                                                                                :text ""}]}
                                                                            :createTime ""
                                                                            :description ""
                                                                            :disabled false
                                                                            :filename ""
                                                                            :filter ""
                                                                            :gitFileSource {:path ""
                                                                                            :repoType ""
                                                                                            :revision ""
                                                                                            :uri ""}
                                                                            :github {:enterpriseConfigResourceName ""
                                                                                     :installationId ""
                                                                                     :name ""
                                                                                     :owner ""
                                                                                     :pullRequest {:branch ""
                                                                                                   :commentControl ""
                                                                                                   :invertRegex false}
                                                                                     :push {:branch ""
                                                                                            :invertRegex false
                                                                                            :tag ""}}
                                                                            :id ""
                                                                            :ignoredFiles []
                                                                            :includedFiles []
                                                                            :name ""
                                                                            :pubsubConfig {:serviceAccountEmail ""
                                                                                           :state ""
                                                                                           :subscription ""
                                                                                           :topic ""}
                                                                            :resourceName ""
                                                                            :serviceAccount ""
                                                                            :sourceToBuild {:ref ""
                                                                                            :repoType ""
                                                                                            :uri ""}
                                                                            :substitutions {}
                                                                            :tags []
                                                                            :triggerTemplate {}
                                                                            :webhookConfig {:secret ""
                                                                                            :state ""}}})
require "http/client"

url = "{{baseUrl}}/v1/:resourceName"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/v1/:resourceName"),
    Content = new StringContent("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:resourceName");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:resourceName"

	payload := strings.NewReader("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/v1/:resourceName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4022

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:resourceName")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:resourceName"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:resourceName")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:resourceName")
  .header("content-type", "application/json")
  .body("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1/:resourceName');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/:resourceName',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:resourceName';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:resourceName',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:resourceName")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:resourceName',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  approvalConfig: {approvalRequired: false},
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {branch: '', commentControl: '', invertRegex: false},
    push: {branch: '', invertRegex: false, tag: ''}
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {ref: '', repoType: '', uri: ''},
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {secret: '', state: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/:resourceName',
  headers: {'content-type': 'application/json'},
  body: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/v1/:resourceName');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/:resourceName',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:resourceName';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"approvalConfig": @{ @"approvalRequired": @NO },
                              @"autodetect": @NO,
                              @"build": @{ @"approval": @{ @"config": @{  }, @"result": @{ @"approvalTime": @"", @"approverAccount": @"", @"comment": @"", @"decision": @"", @"url": @"" }, @"state": @"" }, @"artifacts": @{ @"images": @[  ], @"objects": @{ @"location": @"", @"paths": @[  ], @"timing": @{ @"endTime": @"", @"startTime": @"" } } }, @"availableSecrets": @{ @"inline": @[ @{ @"envMap": @{  }, @"kmsKeyName": @"" } ], @"secretManager": @[ @{ @"env": @"", @"versionName": @"" } ] }, @"buildTriggerId": @"", @"createTime": @"", @"failureInfo": @{ @"detail": @"", @"type": @"" }, @"finishTime": @"", @"id": @"", @"images": @[  ], @"logUrl": @"", @"logsBucket": @"", @"name": @"", @"options": @{ @"diskSizeGb": @"", @"dynamicSubstitutions": @NO, @"env": @[  ], @"logStreamingOption": @"", @"logging": @"", @"machineType": @"", @"pool": @{ @"name": @"" }, @"requestedVerifyOption": @"", @"secretEnv": @[  ], @"sourceProvenanceHash": @[  ], @"substitutionOption": @"", @"volumes": @[ @{ @"name": @"", @"path": @"" } ], @"workerPool": @"" }, @"projectId": @"", @"queueTtl": @"", @"results": @{ @"artifactManifest": @"", @"artifactTiming": @{  }, @"buildStepImages": @[  ], @"buildStepOutputs": @[  ], @"images": @[ @{ @"digest": @"", @"name": @"", @"pushTiming": @{  } } ], @"numArtifacts": @"" }, @"secrets": @[ @{ @"kmsKeyName": @"", @"secretEnv": @{  } } ], @"serviceAccount": @"", @"source": @{ @"repoSource": @{ @"branchName": @"", @"commitSha": @"", @"dir": @"", @"invertRegex": @NO, @"projectId": @"", @"repoName": @"", @"substitutions": @{  }, @"tagName": @"" }, @"storageSource": @{ @"bucket": @"", @"generation": @"", @"object": @"" }, @"storageSourceManifest": @{ @"bucket": @"", @"generation": @"", @"object": @"" } }, @"sourceProvenance": @{ @"fileHashes": @{  }, @"resolvedRepoSource": @{  }, @"resolvedStorageSource": @{  }, @"resolvedStorageSourceManifest": @{  } }, @"startTime": @"", @"status": @"", @"statusDetail": @"", @"steps": @[ @{ @"args": @[  ], @"dir": @"", @"entrypoint": @"", @"env": @[  ], @"id": @"", @"name": @"", @"pullTiming": @{  }, @"script": @"", @"secretEnv": @[  ], @"status": @"", @"timeout": @"", @"timing": @{  }, @"volumes": @[ @{  } ], @"waitFor": @[  ] } ], @"substitutions": @{  }, @"tags": @[  ], @"timeout": @"", @"timing": @{  }, @"warnings": @[ @{ @"priority": @"", @"text": @"" } ] },
                              @"createTime": @"",
                              @"description": @"",
                              @"disabled": @NO,
                              @"filename": @"",
                              @"filter": @"",
                              @"gitFileSource": @{ @"path": @"", @"repoType": @"", @"revision": @"", @"uri": @"" },
                              @"github": @{ @"enterpriseConfigResourceName": @"", @"installationId": @"", @"name": @"", @"owner": @"", @"pullRequest": @{ @"branch": @"", @"commentControl": @"", @"invertRegex": @NO }, @"push": @{ @"branch": @"", @"invertRegex": @NO, @"tag": @"" } },
                              @"id": @"",
                              @"ignoredFiles": @[  ],
                              @"includedFiles": @[  ],
                              @"name": @"",
                              @"pubsubConfig": @{ @"serviceAccountEmail": @"", @"state": @"", @"subscription": @"", @"topic": @"" },
                              @"resourceName": @"",
                              @"serviceAccount": @"",
                              @"sourceToBuild": @{ @"ref": @"", @"repoType": @"", @"uri": @"" },
                              @"substitutions": @{  },
                              @"tags": @[  ],
                              @"triggerTemplate": @{  },
                              @"webhookConfig": @{ @"secret": @"", @"state": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:resourceName"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:resourceName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:resourceName",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'approvalConfig' => [
        'approvalRequired' => null
    ],
    'autodetect' => null,
    'build' => [
        'approval' => [
                'config' => [
                                
                ],
                'result' => [
                                'approvalTime' => '',
                                'approverAccount' => '',
                                'comment' => '',
                                'decision' => '',
                                'url' => ''
                ],
                'state' => ''
        ],
        'artifacts' => [
                'images' => [
                                
                ],
                'objects' => [
                                'location' => '',
                                'paths' => [
                                                                
                                ],
                                'timing' => [
                                                                'endTime' => '',
                                                                'startTime' => ''
                                ]
                ]
        ],
        'availableSecrets' => [
                'inline' => [
                                [
                                                                'envMap' => [
                                                                                                                                
                                                                ],
                                                                'kmsKeyName' => ''
                                ]
                ],
                'secretManager' => [
                                [
                                                                'env' => '',
                                                                'versionName' => ''
                                ]
                ]
        ],
        'buildTriggerId' => '',
        'createTime' => '',
        'failureInfo' => [
                'detail' => '',
                'type' => ''
        ],
        'finishTime' => '',
        'id' => '',
        'images' => [
                
        ],
        'logUrl' => '',
        'logsBucket' => '',
        'name' => '',
        'options' => [
                'diskSizeGb' => '',
                'dynamicSubstitutions' => null,
                'env' => [
                                
                ],
                'logStreamingOption' => '',
                'logging' => '',
                'machineType' => '',
                'pool' => [
                                'name' => ''
                ],
                'requestedVerifyOption' => '',
                'secretEnv' => [
                                
                ],
                'sourceProvenanceHash' => [
                                
                ],
                'substitutionOption' => '',
                'volumes' => [
                                [
                                                                'name' => '',
                                                                'path' => ''
                                ]
                ],
                'workerPool' => ''
        ],
        'projectId' => '',
        'queueTtl' => '',
        'results' => [
                'artifactManifest' => '',
                'artifactTiming' => [
                                
                ],
                'buildStepImages' => [
                                
                ],
                'buildStepOutputs' => [
                                
                ],
                'images' => [
                                [
                                                                'digest' => '',
                                                                'name' => '',
                                                                'pushTiming' => [
                                                                                                                                
                                                                ]
                                ]
                ],
                'numArtifacts' => ''
        ],
        'secrets' => [
                [
                                'kmsKeyName' => '',
                                'secretEnv' => [
                                                                
                                ]
                ]
        ],
        'serviceAccount' => '',
        'source' => [
                'repoSource' => [
                                'branchName' => '',
                                'commitSha' => '',
                                'dir' => '',
                                'invertRegex' => null,
                                'projectId' => '',
                                'repoName' => '',
                                'substitutions' => [
                                                                
                                ],
                                'tagName' => ''
                ],
                'storageSource' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ],
                'storageSourceManifest' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ]
        ],
        'sourceProvenance' => [
                'fileHashes' => [
                                
                ],
                'resolvedRepoSource' => [
                                
                ],
                'resolvedStorageSource' => [
                                
                ],
                'resolvedStorageSourceManifest' => [
                                
                ]
        ],
        'startTime' => '',
        'status' => '',
        'statusDetail' => '',
        'steps' => [
                [
                                'args' => [
                                                                
                                ],
                                'dir' => '',
                                'entrypoint' => '',
                                'env' => [
                                                                
                                ],
                                'id' => '',
                                'name' => '',
                                'pullTiming' => [
                                                                
                                ],
                                'script' => '',
                                'secretEnv' => [
                                                                
                                ],
                                'status' => '',
                                'timeout' => '',
                                'timing' => [
                                                                
                                ],
                                'volumes' => [
                                                                [
                                                                                                                                
                                                                ]
                                ],
                                'waitFor' => [
                                                                
                                ]
                ]
        ],
        'substitutions' => [
                
        ],
        'tags' => [
                
        ],
        'timeout' => '',
        'timing' => [
                
        ],
        'warnings' => [
                [
                                'priority' => '',
                                'text' => ''
                ]
        ]
    ],
    'createTime' => '',
    'description' => '',
    'disabled' => null,
    'filename' => '',
    'filter' => '',
    'gitFileSource' => [
        'path' => '',
        'repoType' => '',
        'revision' => '',
        'uri' => ''
    ],
    'github' => [
        'enterpriseConfigResourceName' => '',
        'installationId' => '',
        'name' => '',
        'owner' => '',
        'pullRequest' => [
                'branch' => '',
                'commentControl' => '',
                'invertRegex' => null
        ],
        'push' => [
                'branch' => '',
                'invertRegex' => null,
                'tag' => ''
        ]
    ],
    'id' => '',
    'ignoredFiles' => [
        
    ],
    'includedFiles' => [
        
    ],
    'name' => '',
    'pubsubConfig' => [
        'serviceAccountEmail' => '',
        'state' => '',
        'subscription' => '',
        'topic' => ''
    ],
    'resourceName' => '',
    'serviceAccount' => '',
    'sourceToBuild' => [
        'ref' => '',
        'repoType' => '',
        'uri' => ''
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'triggerTemplate' => [
        
    ],
    'webhookConfig' => [
        'secret' => '',
        'state' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/v1/:resourceName', [
  'body' => '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:resourceName');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:resourceName');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:resourceName' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:resourceName' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1/:resourceName", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:resourceName"

payload = {
    "approvalConfig": { "approvalRequired": False },
    "autodetect": False,
    "build": {
        "approval": {
            "config": {},
            "result": {
                "approvalTime": "",
                "approverAccount": "",
                "comment": "",
                "decision": "",
                "url": ""
            },
            "state": ""
        },
        "artifacts": {
            "images": [],
            "objects": {
                "location": "",
                "paths": [],
                "timing": {
                    "endTime": "",
                    "startTime": ""
                }
            }
        },
        "availableSecrets": {
            "inline": [
                {
                    "envMap": {},
                    "kmsKeyName": ""
                }
            ],
            "secretManager": [
                {
                    "env": "",
                    "versionName": ""
                }
            ]
        },
        "buildTriggerId": "",
        "createTime": "",
        "failureInfo": {
            "detail": "",
            "type": ""
        },
        "finishTime": "",
        "id": "",
        "images": [],
        "logUrl": "",
        "logsBucket": "",
        "name": "",
        "options": {
            "diskSizeGb": "",
            "dynamicSubstitutions": False,
            "env": [],
            "logStreamingOption": "",
            "logging": "",
            "machineType": "",
            "pool": { "name": "" },
            "requestedVerifyOption": "",
            "secretEnv": [],
            "sourceProvenanceHash": [],
            "substitutionOption": "",
            "volumes": [
                {
                    "name": "",
                    "path": ""
                }
            ],
            "workerPool": ""
        },
        "projectId": "",
        "queueTtl": "",
        "results": {
            "artifactManifest": "",
            "artifactTiming": {},
            "buildStepImages": [],
            "buildStepOutputs": [],
            "images": [
                {
                    "digest": "",
                    "name": "",
                    "pushTiming": {}
                }
            ],
            "numArtifacts": ""
        },
        "secrets": [
            {
                "kmsKeyName": "",
                "secretEnv": {}
            }
        ],
        "serviceAccount": "",
        "source": {
            "repoSource": {
                "branchName": "",
                "commitSha": "",
                "dir": "",
                "invertRegex": False,
                "projectId": "",
                "repoName": "",
                "substitutions": {},
                "tagName": ""
            },
            "storageSource": {
                "bucket": "",
                "generation": "",
                "object": ""
            },
            "storageSourceManifest": {
                "bucket": "",
                "generation": "",
                "object": ""
            }
        },
        "sourceProvenance": {
            "fileHashes": {},
            "resolvedRepoSource": {},
            "resolvedStorageSource": {},
            "resolvedStorageSourceManifest": {}
        },
        "startTime": "",
        "status": "",
        "statusDetail": "",
        "steps": [
            {
                "args": [],
                "dir": "",
                "entrypoint": "",
                "env": [],
                "id": "",
                "name": "",
                "pullTiming": {},
                "script": "",
                "secretEnv": [],
                "status": "",
                "timeout": "",
                "timing": {},
                "volumes": [{}],
                "waitFor": []
            }
        ],
        "substitutions": {},
        "tags": [],
        "timeout": "",
        "timing": {},
        "warnings": [
            {
                "priority": "",
                "text": ""
            }
        ]
    },
    "createTime": "",
    "description": "",
    "disabled": False,
    "filename": "",
    "filter": "",
    "gitFileSource": {
        "path": "",
        "repoType": "",
        "revision": "",
        "uri": ""
    },
    "github": {
        "enterpriseConfigResourceName": "",
        "installationId": "",
        "name": "",
        "owner": "",
        "pullRequest": {
            "branch": "",
            "commentControl": "",
            "invertRegex": False
        },
        "push": {
            "branch": "",
            "invertRegex": False,
            "tag": ""
        }
    },
    "id": "",
    "ignoredFiles": [],
    "includedFiles": [],
    "name": "",
    "pubsubConfig": {
        "serviceAccountEmail": "",
        "state": "",
        "subscription": "",
        "topic": ""
    },
    "resourceName": "",
    "serviceAccount": "",
    "sourceToBuild": {
        "ref": "",
        "repoType": "",
        "uri": ""
    },
    "substitutions": {},
    "tags": [],
    "triggerTemplate": {},
    "webhookConfig": {
        "secret": "",
        "state": ""
    }
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:resourceName"

payload <- "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:resourceName")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/v1/:resourceName') do |req|
  req.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:resourceName";

    let payload = json!({
        "approvalConfig": json!({"approvalRequired": false}),
        "autodetect": false,
        "build": json!({
            "approval": json!({
                "config": json!({}),
                "result": json!({
                    "approvalTime": "",
                    "approverAccount": "",
                    "comment": "",
                    "decision": "",
                    "url": ""
                }),
                "state": ""
            }),
            "artifacts": json!({
                "images": (),
                "objects": json!({
                    "location": "",
                    "paths": (),
                    "timing": json!({
                        "endTime": "",
                        "startTime": ""
                    })
                })
            }),
            "availableSecrets": json!({
                "inline": (
                    json!({
                        "envMap": json!({}),
                        "kmsKeyName": ""
                    })
                ),
                "secretManager": (
                    json!({
                        "env": "",
                        "versionName": ""
                    })
                )
            }),
            "buildTriggerId": "",
            "createTime": "",
            "failureInfo": json!({
                "detail": "",
                "type": ""
            }),
            "finishTime": "",
            "id": "",
            "images": (),
            "logUrl": "",
            "logsBucket": "",
            "name": "",
            "options": json!({
                "diskSizeGb": "",
                "dynamicSubstitutions": false,
                "env": (),
                "logStreamingOption": "",
                "logging": "",
                "machineType": "",
                "pool": json!({"name": ""}),
                "requestedVerifyOption": "",
                "secretEnv": (),
                "sourceProvenanceHash": (),
                "substitutionOption": "",
                "volumes": (
                    json!({
                        "name": "",
                        "path": ""
                    })
                ),
                "workerPool": ""
            }),
            "projectId": "",
            "queueTtl": "",
            "results": json!({
                "artifactManifest": "",
                "artifactTiming": json!({}),
                "buildStepImages": (),
                "buildStepOutputs": (),
                "images": (
                    json!({
                        "digest": "",
                        "name": "",
                        "pushTiming": json!({})
                    })
                ),
                "numArtifacts": ""
            }),
            "secrets": (
                json!({
                    "kmsKeyName": "",
                    "secretEnv": json!({})
                })
            ),
            "serviceAccount": "",
            "source": json!({
                "repoSource": json!({
                    "branchName": "",
                    "commitSha": "",
                    "dir": "",
                    "invertRegex": false,
                    "projectId": "",
                    "repoName": "",
                    "substitutions": json!({}),
                    "tagName": ""
                }),
                "storageSource": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                }),
                "storageSourceManifest": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                })
            }),
            "sourceProvenance": json!({
                "fileHashes": json!({}),
                "resolvedRepoSource": json!({}),
                "resolvedStorageSource": json!({}),
                "resolvedStorageSourceManifest": json!({})
            }),
            "startTime": "",
            "status": "",
            "statusDetail": "",
            "steps": (
                json!({
                    "args": (),
                    "dir": "",
                    "entrypoint": "",
                    "env": (),
                    "id": "",
                    "name": "",
                    "pullTiming": json!({}),
                    "script": "",
                    "secretEnv": (),
                    "status": "",
                    "timeout": "",
                    "timing": json!({}),
                    "volumes": (json!({})),
                    "waitFor": ()
                })
            ),
            "substitutions": json!({}),
            "tags": (),
            "timeout": "",
            "timing": json!({}),
            "warnings": (
                json!({
                    "priority": "",
                    "text": ""
                })
            )
        }),
        "createTime": "",
        "description": "",
        "disabled": false,
        "filename": "",
        "filter": "",
        "gitFileSource": json!({
            "path": "",
            "repoType": "",
            "revision": "",
            "uri": ""
        }),
        "github": json!({
            "enterpriseConfigResourceName": "",
            "installationId": "",
            "name": "",
            "owner": "",
            "pullRequest": json!({
                "branch": "",
                "commentControl": "",
                "invertRegex": false
            }),
            "push": json!({
                "branch": "",
                "invertRegex": false,
                "tag": ""
            })
        }),
        "id": "",
        "ignoredFiles": (),
        "includedFiles": (),
        "name": "",
        "pubsubConfig": json!({
            "serviceAccountEmail": "",
            "state": "",
            "subscription": "",
            "topic": ""
        }),
        "resourceName": "",
        "serviceAccount": "",
        "sourceToBuild": json!({
            "ref": "",
            "repoType": "",
            "uri": ""
        }),
        "substitutions": json!({}),
        "tags": (),
        "triggerTemplate": json!({}),
        "webhookConfig": json!({
            "secret": "",
            "state": ""
        })
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/v1/:resourceName \
  --header 'content-type: application/json' \
  --data '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
echo '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}' |  \
  http PATCH {{baseUrl}}/v1/:resourceName \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/:resourceName
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "approvalConfig": ["approvalRequired": false],
  "autodetect": false,
  "build": [
    "approval": [
      "config": [],
      "result": [
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      ],
      "state": ""
    ],
    "artifacts": [
      "images": [],
      "objects": [
        "location": "",
        "paths": [],
        "timing": [
          "endTime": "",
          "startTime": ""
        ]
      ]
    ],
    "availableSecrets": [
      "inline": [
        [
          "envMap": [],
          "kmsKeyName": ""
        ]
      ],
      "secretManager": [
        [
          "env": "",
          "versionName": ""
        ]
      ]
    ],
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": [
      "detail": "",
      "type": ""
    ],
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": [
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": ["name": ""],
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        [
          "name": "",
          "path": ""
        ]
      ],
      "workerPool": ""
    ],
    "projectId": "",
    "queueTtl": "",
    "results": [
      "artifactManifest": "",
      "artifactTiming": [],
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        [
          "digest": "",
          "name": "",
          "pushTiming": []
        ]
      ],
      "numArtifacts": ""
    ],
    "secrets": [
      [
        "kmsKeyName": "",
        "secretEnv": []
      ]
    ],
    "serviceAccount": "",
    "source": [
      "repoSource": [
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": [],
        "tagName": ""
      ],
      "storageSource": [
        "bucket": "",
        "generation": "",
        "object": ""
      ],
      "storageSourceManifest": [
        "bucket": "",
        "generation": "",
        "object": ""
      ]
    ],
    "sourceProvenance": [
      "fileHashes": [],
      "resolvedRepoSource": [],
      "resolvedStorageSource": [],
      "resolvedStorageSourceManifest": []
    ],
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      [
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": [],
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": [],
        "volumes": [[]],
        "waitFor": []
      ]
    ],
    "substitutions": [],
    "tags": [],
    "timeout": "",
    "timing": [],
    "warnings": [
      [
        "priority": "",
        "text": ""
      ]
    ]
  ],
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": [
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  ],
  "github": [
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": [
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    ],
    "push": [
      "branch": "",
      "invertRegex": false,
      "tag": ""
    ]
  ],
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": [
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  ],
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": [
    "ref": "",
    "repoType": "",
    "uri": ""
  ],
  "substitutions": [],
  "tags": [],
  "triggerTemplate": [],
  "webhookConfig": [
    "secret": "",
    "state": ""
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:resourceName")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
PATCH Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.
{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
QUERY PARAMS

projectId
triggerId
BODY json

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId" {:content-type :json
                                                                                        :form-params {:approvalConfig {:approvalRequired false}
                                                                                                      :autodetect false
                                                                                                      :build {:approval {:config {}
                                                                                                                         :result {:approvalTime ""
                                                                                                                                  :approverAccount ""
                                                                                                                                  :comment ""
                                                                                                                                  :decision ""
                                                                                                                                  :url ""}
                                                                                                                         :state ""}
                                                                                                              :artifacts {:images []
                                                                                                                          :objects {:location ""
                                                                                                                                    :paths []
                                                                                                                                    :timing {:endTime ""
                                                                                                                                             :startTime ""}}}
                                                                                                              :availableSecrets {:inline [{:envMap {}
                                                                                                                                           :kmsKeyName ""}]
                                                                                                                                 :secretManager [{:env ""
                                                                                                                                                  :versionName ""}]}
                                                                                                              :buildTriggerId ""
                                                                                                              :createTime ""
                                                                                                              :failureInfo {:detail ""
                                                                                                                            :type ""}
                                                                                                              :finishTime ""
                                                                                                              :id ""
                                                                                                              :images []
                                                                                                              :logUrl ""
                                                                                                              :logsBucket ""
                                                                                                              :name ""
                                                                                                              :options {:diskSizeGb ""
                                                                                                                        :dynamicSubstitutions false
                                                                                                                        :env []
                                                                                                                        :logStreamingOption ""
                                                                                                                        :logging ""
                                                                                                                        :machineType ""
                                                                                                                        :pool {:name ""}
                                                                                                                        :requestedVerifyOption ""
                                                                                                                        :secretEnv []
                                                                                                                        :sourceProvenanceHash []
                                                                                                                        :substitutionOption ""
                                                                                                                        :volumes [{:name ""
                                                                                                                                   :path ""}]
                                                                                                                        :workerPool ""}
                                                                                                              :projectId ""
                                                                                                              :queueTtl ""
                                                                                                              :results {:artifactManifest ""
                                                                                                                        :artifactTiming {}
                                                                                                                        :buildStepImages []
                                                                                                                        :buildStepOutputs []
                                                                                                                        :images [{:digest ""
                                                                                                                                  :name ""
                                                                                                                                  :pushTiming {}}]
                                                                                                                        :numArtifacts ""}
                                                                                                              :secrets [{:kmsKeyName ""
                                                                                                                         :secretEnv {}}]
                                                                                                              :serviceAccount ""
                                                                                                              :source {:repoSource {:branchName ""
                                                                                                                                    :commitSha ""
                                                                                                                                    :dir ""
                                                                                                                                    :invertRegex false
                                                                                                                                    :projectId ""
                                                                                                                                    :repoName ""
                                                                                                                                    :substitutions {}
                                                                                                                                    :tagName ""}
                                                                                                                       :storageSource {:bucket ""
                                                                                                                                       :generation ""
                                                                                                                                       :object ""}
                                                                                                                       :storageSourceManifest {:bucket ""
                                                                                                                                               :generation ""
                                                                                                                                               :object ""}}
                                                                                                              :sourceProvenance {:fileHashes {}
                                                                                                                                 :resolvedRepoSource {}
                                                                                                                                 :resolvedStorageSource {}
                                                                                                                                 :resolvedStorageSourceManifest {}}
                                                                                                              :startTime ""
                                                                                                              :status ""
                                                                                                              :statusDetail ""
                                                                                                              :steps [{:args []
                                                                                                                       :dir ""
                                                                                                                       :entrypoint ""
                                                                                                                       :env []
                                                                                                                       :id ""
                                                                                                                       :name ""
                                                                                                                       :pullTiming {}
                                                                                                                       :script ""
                                                                                                                       :secretEnv []
                                                                                                                       :status ""
                                                                                                                       :timeout ""
                                                                                                                       :timing {}
                                                                                                                       :volumes [{}]
                                                                                                                       :waitFor []}]
                                                                                                              :substitutions {}
                                                                                                              :tags []
                                                                                                              :timeout ""
                                                                                                              :timing {}
                                                                                                              :warnings [{:priority ""
                                                                                                                          :text ""}]}
                                                                                                      :createTime ""
                                                                                                      :description ""
                                                                                                      :disabled false
                                                                                                      :filename ""
                                                                                                      :filter ""
                                                                                                      :gitFileSource {:path ""
                                                                                                                      :repoType ""
                                                                                                                      :revision ""
                                                                                                                      :uri ""}
                                                                                                      :github {:enterpriseConfigResourceName ""
                                                                                                               :installationId ""
                                                                                                               :name ""
                                                                                                               :owner ""
                                                                                                               :pullRequest {:branch ""
                                                                                                                             :commentControl ""
                                                                                                                             :invertRegex false}
                                                                                                               :push {:branch ""
                                                                                                                      :invertRegex false
                                                                                                                      :tag ""}}
                                                                                                      :id ""
                                                                                                      :ignoredFiles []
                                                                                                      :includedFiles []
                                                                                                      :name ""
                                                                                                      :pubsubConfig {:serviceAccountEmail ""
                                                                                                                     :state ""
                                                                                                                     :subscription ""
                                                                                                                     :topic ""}
                                                                                                      :resourceName ""
                                                                                                      :serviceAccount ""
                                                                                                      :sourceToBuild {:ref ""
                                                                                                                      :repoType ""
                                                                                                                      :uri ""}
                                                                                                      :substitutions {}
                                                                                                      :tags []
                                                                                                      :triggerTemplate {}
                                                                                                      :webhookConfig {:secret ""
                                                                                                                      :state ""}}})
require "http/client"

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"),
    Content = new StringContent("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

	payload := strings.NewReader("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/v1/projects/:projectId/triggers/:triggerId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4022

{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .header("content-type", "application/json")
  .body("{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
  .asString();
const data = JSON.stringify({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/projects/:projectId/triggers/:triggerId',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  approvalConfig: {approvalRequired: false},
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
      state: ''
    },
    artifacts: {
      images: [],
      objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
    },
    availableSecrets: {
      inline: [{envMap: {}, kmsKeyName: ''}],
      secretManager: [{env: '', versionName: ''}]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {detail: '', type: ''},
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {name: ''},
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [{name: '', path: ''}],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [{digest: '', name: '', pushTiming: {}}],
      numArtifacts: ''
    },
    secrets: [{kmsKeyName: '', secretEnv: {}}],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {bucket: '', generation: '', object: ''},
      storageSourceManifest: {bucket: '', generation: '', object: ''}
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [{}],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [{priority: '', text: ''}]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {branch: '', commentControl: '', invertRegex: false},
    push: {branch: '', invertRegex: false, tag: ''}
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {ref: '', repoType: '', uri: ''},
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {secret: '', state: ''}
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId',
  headers: {'content-type': 'application/json'},
  body: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  approvalConfig: {
    approvalRequired: false
  },
  autodetect: false,
  build: {
    approval: {
      config: {},
      result: {
        approvalTime: '',
        approverAccount: '',
        comment: '',
        decision: '',
        url: ''
      },
      state: ''
    },
    artifacts: {
      images: [],
      objects: {
        location: '',
        paths: [],
        timing: {
          endTime: '',
          startTime: ''
        }
      }
    },
    availableSecrets: {
      inline: [
        {
          envMap: {},
          kmsKeyName: ''
        }
      ],
      secretManager: [
        {
          env: '',
          versionName: ''
        }
      ]
    },
    buildTriggerId: '',
    createTime: '',
    failureInfo: {
      detail: '',
      type: ''
    },
    finishTime: '',
    id: '',
    images: [],
    logUrl: '',
    logsBucket: '',
    name: '',
    options: {
      diskSizeGb: '',
      dynamicSubstitutions: false,
      env: [],
      logStreamingOption: '',
      logging: '',
      machineType: '',
      pool: {
        name: ''
      },
      requestedVerifyOption: '',
      secretEnv: [],
      sourceProvenanceHash: [],
      substitutionOption: '',
      volumes: [
        {
          name: '',
          path: ''
        }
      ],
      workerPool: ''
    },
    projectId: '',
    queueTtl: '',
    results: {
      artifactManifest: '',
      artifactTiming: {},
      buildStepImages: [],
      buildStepOutputs: [],
      images: [
        {
          digest: '',
          name: '',
          pushTiming: {}
        }
      ],
      numArtifacts: ''
    },
    secrets: [
      {
        kmsKeyName: '',
        secretEnv: {}
      }
    ],
    serviceAccount: '',
    source: {
      repoSource: {
        branchName: '',
        commitSha: '',
        dir: '',
        invertRegex: false,
        projectId: '',
        repoName: '',
        substitutions: {},
        tagName: ''
      },
      storageSource: {
        bucket: '',
        generation: '',
        object: ''
      },
      storageSourceManifest: {
        bucket: '',
        generation: '',
        object: ''
      }
    },
    sourceProvenance: {
      fileHashes: {},
      resolvedRepoSource: {},
      resolvedStorageSource: {},
      resolvedStorageSourceManifest: {}
    },
    startTime: '',
    status: '',
    statusDetail: '',
    steps: [
      {
        args: [],
        dir: '',
        entrypoint: '',
        env: [],
        id: '',
        name: '',
        pullTiming: {},
        script: '',
        secretEnv: [],
        status: '',
        timeout: '',
        timing: {},
        volumes: [
          {}
        ],
        waitFor: []
      }
    ],
    substitutions: {},
    tags: [],
    timeout: '',
    timing: {},
    warnings: [
      {
        priority: '',
        text: ''
      }
    ]
  },
  createTime: '',
  description: '',
  disabled: false,
  filename: '',
  filter: '',
  gitFileSource: {
    path: '',
    repoType: '',
    revision: '',
    uri: ''
  },
  github: {
    enterpriseConfigResourceName: '',
    installationId: '',
    name: '',
    owner: '',
    pullRequest: {
      branch: '',
      commentControl: '',
      invertRegex: false
    },
    push: {
      branch: '',
      invertRegex: false,
      tag: ''
    }
  },
  id: '',
  ignoredFiles: [],
  includedFiles: [],
  name: '',
  pubsubConfig: {
    serviceAccountEmail: '',
    state: '',
    subscription: '',
    topic: ''
  },
  resourceName: '',
  serviceAccount: '',
  sourceToBuild: {
    ref: '',
    repoType: '',
    uri: ''
  },
  substitutions: {},
  tags: [],
  triggerTemplate: {},
  webhookConfig: {
    secret: '',
    state: ''
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId',
  headers: {'content-type': 'application/json'},
  data: {
    approvalConfig: {approvalRequired: false},
    autodetect: false,
    build: {
      approval: {
        config: {},
        result: {approvalTime: '', approverAccount: '', comment: '', decision: '', url: ''},
        state: ''
      },
      artifacts: {
        images: [],
        objects: {location: '', paths: [], timing: {endTime: '', startTime: ''}}
      },
      availableSecrets: {
        inline: [{envMap: {}, kmsKeyName: ''}],
        secretManager: [{env: '', versionName: ''}]
      },
      buildTriggerId: '',
      createTime: '',
      failureInfo: {detail: '', type: ''},
      finishTime: '',
      id: '',
      images: [],
      logUrl: '',
      logsBucket: '',
      name: '',
      options: {
        diskSizeGb: '',
        dynamicSubstitutions: false,
        env: [],
        logStreamingOption: '',
        logging: '',
        machineType: '',
        pool: {name: ''},
        requestedVerifyOption: '',
        secretEnv: [],
        sourceProvenanceHash: [],
        substitutionOption: '',
        volumes: [{name: '', path: ''}],
        workerPool: ''
      },
      projectId: '',
      queueTtl: '',
      results: {
        artifactManifest: '',
        artifactTiming: {},
        buildStepImages: [],
        buildStepOutputs: [],
        images: [{digest: '', name: '', pushTiming: {}}],
        numArtifacts: ''
      },
      secrets: [{kmsKeyName: '', secretEnv: {}}],
      serviceAccount: '',
      source: {
        repoSource: {
          branchName: '',
          commitSha: '',
          dir: '',
          invertRegex: false,
          projectId: '',
          repoName: '',
          substitutions: {},
          tagName: ''
        },
        storageSource: {bucket: '', generation: '', object: ''},
        storageSourceManifest: {bucket: '', generation: '', object: ''}
      },
      sourceProvenance: {
        fileHashes: {},
        resolvedRepoSource: {},
        resolvedStorageSource: {},
        resolvedStorageSourceManifest: {}
      },
      startTime: '',
      status: '',
      statusDetail: '',
      steps: [
        {
          args: [],
          dir: '',
          entrypoint: '',
          env: [],
          id: '',
          name: '',
          pullTiming: {},
          script: '',
          secretEnv: [],
          status: '',
          timeout: '',
          timing: {},
          volumes: [{}],
          waitFor: []
        }
      ],
      substitutions: {},
      tags: [],
      timeout: '',
      timing: {},
      warnings: [{priority: '', text: ''}]
    },
    createTime: '',
    description: '',
    disabled: false,
    filename: '',
    filter: '',
    gitFileSource: {path: '', repoType: '', revision: '', uri: ''},
    github: {
      enterpriseConfigResourceName: '',
      installationId: '',
      name: '',
      owner: '',
      pullRequest: {branch: '', commentControl: '', invertRegex: false},
      push: {branch: '', invertRegex: false, tag: ''}
    },
    id: '',
    ignoredFiles: [],
    includedFiles: [],
    name: '',
    pubsubConfig: {serviceAccountEmail: '', state: '', subscription: '', topic: ''},
    resourceName: '',
    serviceAccount: '',
    sourceToBuild: {ref: '', repoType: '', uri: ''},
    substitutions: {},
    tags: [],
    triggerTemplate: {},
    webhookConfig: {secret: '', state: ''}
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"approvalConfig":{"approvalRequired":false},"autodetect":false,"build":{"approval":{"config":{},"result":{"approvalTime":"","approverAccount":"","comment":"","decision":"","url":""},"state":""},"artifacts":{"images":[],"objects":{"location":"","paths":[],"timing":{"endTime":"","startTime":""}}},"availableSecrets":{"inline":[{"envMap":{},"kmsKeyName":""}],"secretManager":[{"env":"","versionName":""}]},"buildTriggerId":"","createTime":"","failureInfo":{"detail":"","type":""},"finishTime":"","id":"","images":[],"logUrl":"","logsBucket":"","name":"","options":{"diskSizeGb":"","dynamicSubstitutions":false,"env":[],"logStreamingOption":"","logging":"","machineType":"","pool":{"name":""},"requestedVerifyOption":"","secretEnv":[],"sourceProvenanceHash":[],"substitutionOption":"","volumes":[{"name":"","path":""}],"workerPool":""},"projectId":"","queueTtl":"","results":{"artifactManifest":"","artifactTiming":{},"buildStepImages":[],"buildStepOutputs":[],"images":[{"digest":"","name":"","pushTiming":{}}],"numArtifacts":""},"secrets":[{"kmsKeyName":"","secretEnv":{}}],"serviceAccount":"","source":{"repoSource":{"branchName":"","commitSha":"","dir":"","invertRegex":false,"projectId":"","repoName":"","substitutions":{},"tagName":""},"storageSource":{"bucket":"","generation":"","object":""},"storageSourceManifest":{"bucket":"","generation":"","object":""}},"sourceProvenance":{"fileHashes":{},"resolvedRepoSource":{},"resolvedStorageSource":{},"resolvedStorageSourceManifest":{}},"startTime":"","status":"","statusDetail":"","steps":[{"args":[],"dir":"","entrypoint":"","env":[],"id":"","name":"","pullTiming":{},"script":"","secretEnv":[],"status":"","timeout":"","timing":{},"volumes":[{}],"waitFor":[]}],"substitutions":{},"tags":[],"timeout":"","timing":{},"warnings":[{"priority":"","text":""}]},"createTime":"","description":"","disabled":false,"filename":"","filter":"","gitFileSource":{"path":"","repoType":"","revision":"","uri":""},"github":{"enterpriseConfigResourceName":"","installationId":"","name":"","owner":"","pullRequest":{"branch":"","commentControl":"","invertRegex":false},"push":{"branch":"","invertRegex":false,"tag":""}},"id":"","ignoredFiles":[],"includedFiles":[],"name":"","pubsubConfig":{"serviceAccountEmail":"","state":"","subscription":"","topic":""},"resourceName":"","serviceAccount":"","sourceToBuild":{"ref":"","repoType":"","uri":""},"substitutions":{},"tags":[],"triggerTemplate":{},"webhookConfig":{"secret":"","state":""}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"approvalConfig": @{ @"approvalRequired": @NO },
                              @"autodetect": @NO,
                              @"build": @{ @"approval": @{ @"config": @{  }, @"result": @{ @"approvalTime": @"", @"approverAccount": @"", @"comment": @"", @"decision": @"", @"url": @"" }, @"state": @"" }, @"artifacts": @{ @"images": @[  ], @"objects": @{ @"location": @"", @"paths": @[  ], @"timing": @{ @"endTime": @"", @"startTime": @"" } } }, @"availableSecrets": @{ @"inline": @[ @{ @"envMap": @{  }, @"kmsKeyName": @"" } ], @"secretManager": @[ @{ @"env": @"", @"versionName": @"" } ] }, @"buildTriggerId": @"", @"createTime": @"", @"failureInfo": @{ @"detail": @"", @"type": @"" }, @"finishTime": @"", @"id": @"", @"images": @[  ], @"logUrl": @"", @"logsBucket": @"", @"name": @"", @"options": @{ @"diskSizeGb": @"", @"dynamicSubstitutions": @NO, @"env": @[  ], @"logStreamingOption": @"", @"logging": @"", @"machineType": @"", @"pool": @{ @"name": @"" }, @"requestedVerifyOption": @"", @"secretEnv": @[  ], @"sourceProvenanceHash": @[  ], @"substitutionOption": @"", @"volumes": @[ @{ @"name": @"", @"path": @"" } ], @"workerPool": @"" }, @"projectId": @"", @"queueTtl": @"", @"results": @{ @"artifactManifest": @"", @"artifactTiming": @{  }, @"buildStepImages": @[  ], @"buildStepOutputs": @[  ], @"images": @[ @{ @"digest": @"", @"name": @"", @"pushTiming": @{  } } ], @"numArtifacts": @"" }, @"secrets": @[ @{ @"kmsKeyName": @"", @"secretEnv": @{  } } ], @"serviceAccount": @"", @"source": @{ @"repoSource": @{ @"branchName": @"", @"commitSha": @"", @"dir": @"", @"invertRegex": @NO, @"projectId": @"", @"repoName": @"", @"substitutions": @{  }, @"tagName": @"" }, @"storageSource": @{ @"bucket": @"", @"generation": @"", @"object": @"" }, @"storageSourceManifest": @{ @"bucket": @"", @"generation": @"", @"object": @"" } }, @"sourceProvenance": @{ @"fileHashes": @{  }, @"resolvedRepoSource": @{  }, @"resolvedStorageSource": @{  }, @"resolvedStorageSourceManifest": @{  } }, @"startTime": @"", @"status": @"", @"statusDetail": @"", @"steps": @[ @{ @"args": @[  ], @"dir": @"", @"entrypoint": @"", @"env": @[  ], @"id": @"", @"name": @"", @"pullTiming": @{  }, @"script": @"", @"secretEnv": @[  ], @"status": @"", @"timeout": @"", @"timing": @{  }, @"volumes": @[ @{  } ], @"waitFor": @[  ] } ], @"substitutions": @{  }, @"tags": @[  ], @"timeout": @"", @"timing": @{  }, @"warnings": @[ @{ @"priority": @"", @"text": @"" } ] },
                              @"createTime": @"",
                              @"description": @"",
                              @"disabled": @NO,
                              @"filename": @"",
                              @"filter": @"",
                              @"gitFileSource": @{ @"path": @"", @"repoType": @"", @"revision": @"", @"uri": @"" },
                              @"github": @{ @"enterpriseConfigResourceName": @"", @"installationId": @"", @"name": @"", @"owner": @"", @"pullRequest": @{ @"branch": @"", @"commentControl": @"", @"invertRegex": @NO }, @"push": @{ @"branch": @"", @"invertRegex": @NO, @"tag": @"" } },
                              @"id": @"",
                              @"ignoredFiles": @[  ],
                              @"includedFiles": @[  ],
                              @"name": @"",
                              @"pubsubConfig": @{ @"serviceAccountEmail": @"", @"state": @"", @"subscription": @"", @"topic": @"" },
                              @"resourceName": @"",
                              @"serviceAccount": @"",
                              @"sourceToBuild": @{ @"ref": @"", @"repoType": @"", @"uri": @"" },
                              @"substitutions": @{  },
                              @"tags": @[  ],
                              @"triggerTemplate": @{  },
                              @"webhookConfig": @{ @"secret": @"", @"state": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'approvalConfig' => [
        'approvalRequired' => null
    ],
    'autodetect' => null,
    'build' => [
        'approval' => [
                'config' => [
                                
                ],
                'result' => [
                                'approvalTime' => '',
                                'approverAccount' => '',
                                'comment' => '',
                                'decision' => '',
                                'url' => ''
                ],
                'state' => ''
        ],
        'artifacts' => [
                'images' => [
                                
                ],
                'objects' => [
                                'location' => '',
                                'paths' => [
                                                                
                                ],
                                'timing' => [
                                                                'endTime' => '',
                                                                'startTime' => ''
                                ]
                ]
        ],
        'availableSecrets' => [
                'inline' => [
                                [
                                                                'envMap' => [
                                                                                                                                
                                                                ],
                                                                'kmsKeyName' => ''
                                ]
                ],
                'secretManager' => [
                                [
                                                                'env' => '',
                                                                'versionName' => ''
                                ]
                ]
        ],
        'buildTriggerId' => '',
        'createTime' => '',
        'failureInfo' => [
                'detail' => '',
                'type' => ''
        ],
        'finishTime' => '',
        'id' => '',
        'images' => [
                
        ],
        'logUrl' => '',
        'logsBucket' => '',
        'name' => '',
        'options' => [
                'diskSizeGb' => '',
                'dynamicSubstitutions' => null,
                'env' => [
                                
                ],
                'logStreamingOption' => '',
                'logging' => '',
                'machineType' => '',
                'pool' => [
                                'name' => ''
                ],
                'requestedVerifyOption' => '',
                'secretEnv' => [
                                
                ],
                'sourceProvenanceHash' => [
                                
                ],
                'substitutionOption' => '',
                'volumes' => [
                                [
                                                                'name' => '',
                                                                'path' => ''
                                ]
                ],
                'workerPool' => ''
        ],
        'projectId' => '',
        'queueTtl' => '',
        'results' => [
                'artifactManifest' => '',
                'artifactTiming' => [
                                
                ],
                'buildStepImages' => [
                                
                ],
                'buildStepOutputs' => [
                                
                ],
                'images' => [
                                [
                                                                'digest' => '',
                                                                'name' => '',
                                                                'pushTiming' => [
                                                                                                                                
                                                                ]
                                ]
                ],
                'numArtifacts' => ''
        ],
        'secrets' => [
                [
                                'kmsKeyName' => '',
                                'secretEnv' => [
                                                                
                                ]
                ]
        ],
        'serviceAccount' => '',
        'source' => [
                'repoSource' => [
                                'branchName' => '',
                                'commitSha' => '',
                                'dir' => '',
                                'invertRegex' => null,
                                'projectId' => '',
                                'repoName' => '',
                                'substitutions' => [
                                                                
                                ],
                                'tagName' => ''
                ],
                'storageSource' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ],
                'storageSourceManifest' => [
                                'bucket' => '',
                                'generation' => '',
                                'object' => ''
                ]
        ],
        'sourceProvenance' => [
                'fileHashes' => [
                                
                ],
                'resolvedRepoSource' => [
                                
                ],
                'resolvedStorageSource' => [
                                
                ],
                'resolvedStorageSourceManifest' => [
                                
                ]
        ],
        'startTime' => '',
        'status' => '',
        'statusDetail' => '',
        'steps' => [
                [
                                'args' => [
                                                                
                                ],
                                'dir' => '',
                                'entrypoint' => '',
                                'env' => [
                                                                
                                ],
                                'id' => '',
                                'name' => '',
                                'pullTiming' => [
                                                                
                                ],
                                'script' => '',
                                'secretEnv' => [
                                                                
                                ],
                                'status' => '',
                                'timeout' => '',
                                'timing' => [
                                                                
                                ],
                                'volumes' => [
                                                                [
                                                                                                                                
                                                                ]
                                ],
                                'waitFor' => [
                                                                
                                ]
                ]
        ],
        'substitutions' => [
                
        ],
        'tags' => [
                
        ],
        'timeout' => '',
        'timing' => [
                
        ],
        'warnings' => [
                [
                                'priority' => '',
                                'text' => ''
                ]
        ]
    ],
    'createTime' => '',
    'description' => '',
    'disabled' => null,
    'filename' => '',
    'filter' => '',
    'gitFileSource' => [
        'path' => '',
        'repoType' => '',
        'revision' => '',
        'uri' => ''
    ],
    'github' => [
        'enterpriseConfigResourceName' => '',
        'installationId' => '',
        'name' => '',
        'owner' => '',
        'pullRequest' => [
                'branch' => '',
                'commentControl' => '',
                'invertRegex' => null
        ],
        'push' => [
                'branch' => '',
                'invertRegex' => null,
                'tag' => ''
        ]
    ],
    'id' => '',
    'ignoredFiles' => [
        
    ],
    'includedFiles' => [
        
    ],
    'name' => '',
    'pubsubConfig' => [
        'serviceAccountEmail' => '',
        'state' => '',
        'subscription' => '',
        'topic' => ''
    ],
    'resourceName' => '',
    'serviceAccount' => '',
    'sourceToBuild' => [
        'ref' => '',
        'repoType' => '',
        'uri' => ''
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'triggerTemplate' => [
        
    ],
    'webhookConfig' => [
        'secret' => '',
        'state' => ''
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId', [
  'body' => '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'approvalConfig' => [
    'approvalRequired' => null
  ],
  'autodetect' => null,
  'build' => [
    'approval' => [
        'config' => [
                
        ],
        'result' => [
                'approvalTime' => '',
                'approverAccount' => '',
                'comment' => '',
                'decision' => '',
                'url' => ''
        ],
        'state' => ''
    ],
    'artifacts' => [
        'images' => [
                
        ],
        'objects' => [
                'location' => '',
                'paths' => [
                                
                ],
                'timing' => [
                                'endTime' => '',
                                'startTime' => ''
                ]
        ]
    ],
    'availableSecrets' => [
        'inline' => [
                [
                                'envMap' => [
                                                                
                                ],
                                'kmsKeyName' => ''
                ]
        ],
        'secretManager' => [
                [
                                'env' => '',
                                'versionName' => ''
                ]
        ]
    ],
    'buildTriggerId' => '',
    'createTime' => '',
    'failureInfo' => [
        'detail' => '',
        'type' => ''
    ],
    'finishTime' => '',
    'id' => '',
    'images' => [
        
    ],
    'logUrl' => '',
    'logsBucket' => '',
    'name' => '',
    'options' => [
        'diskSizeGb' => '',
        'dynamicSubstitutions' => null,
        'env' => [
                
        ],
        'logStreamingOption' => '',
        'logging' => '',
        'machineType' => '',
        'pool' => [
                'name' => ''
        ],
        'requestedVerifyOption' => '',
        'secretEnv' => [
                
        ],
        'sourceProvenanceHash' => [
                
        ],
        'substitutionOption' => '',
        'volumes' => [
                [
                                'name' => '',
                                'path' => ''
                ]
        ],
        'workerPool' => ''
    ],
    'projectId' => '',
    'queueTtl' => '',
    'results' => [
        'artifactManifest' => '',
        'artifactTiming' => [
                
        ],
        'buildStepImages' => [
                
        ],
        'buildStepOutputs' => [
                
        ],
        'images' => [
                [
                                'digest' => '',
                                'name' => '',
                                'pushTiming' => [
                                                                
                                ]
                ]
        ],
        'numArtifacts' => ''
    ],
    'secrets' => [
        [
                'kmsKeyName' => '',
                'secretEnv' => [
                                
                ]
        ]
    ],
    'serviceAccount' => '',
    'source' => [
        'repoSource' => [
                'branchName' => '',
                'commitSha' => '',
                'dir' => '',
                'invertRegex' => null,
                'projectId' => '',
                'repoName' => '',
                'substitutions' => [
                                
                ],
                'tagName' => ''
        ],
        'storageSource' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ],
        'storageSourceManifest' => [
                'bucket' => '',
                'generation' => '',
                'object' => ''
        ]
    ],
    'sourceProvenance' => [
        'fileHashes' => [
                
        ],
        'resolvedRepoSource' => [
                
        ],
        'resolvedStorageSource' => [
                
        ],
        'resolvedStorageSourceManifest' => [
                
        ]
    ],
    'startTime' => '',
    'status' => '',
    'statusDetail' => '',
    'steps' => [
        [
                'args' => [
                                
                ],
                'dir' => '',
                'entrypoint' => '',
                'env' => [
                                
                ],
                'id' => '',
                'name' => '',
                'pullTiming' => [
                                
                ],
                'script' => '',
                'secretEnv' => [
                                
                ],
                'status' => '',
                'timeout' => '',
                'timing' => [
                                
                ],
                'volumes' => [
                                [
                                                                
                                ]
                ],
                'waitFor' => [
                                
                ]
        ]
    ],
    'substitutions' => [
        
    ],
    'tags' => [
        
    ],
    'timeout' => '',
    'timing' => [
        
    ],
    'warnings' => [
        [
                'priority' => '',
                'text' => ''
        ]
    ]
  ],
  'createTime' => '',
  'description' => '',
  'disabled' => null,
  'filename' => '',
  'filter' => '',
  'gitFileSource' => [
    'path' => '',
    'repoType' => '',
    'revision' => '',
    'uri' => ''
  ],
  'github' => [
    'enterpriseConfigResourceName' => '',
    'installationId' => '',
    'name' => '',
    'owner' => '',
    'pullRequest' => [
        'branch' => '',
        'commentControl' => '',
        'invertRegex' => null
    ],
    'push' => [
        'branch' => '',
        'invertRegex' => null,
        'tag' => ''
    ]
  ],
  'id' => '',
  'ignoredFiles' => [
    
  ],
  'includedFiles' => [
    
  ],
  'name' => '',
  'pubsubConfig' => [
    'serviceAccountEmail' => '',
    'state' => '',
    'subscription' => '',
    'topic' => ''
  ],
  'resourceName' => '',
  'serviceAccount' => '',
  'sourceToBuild' => [
    'ref' => '',
    'repoType' => '',
    'uri' => ''
  ],
  'substitutions' => [
    
  ],
  'tags' => [
    
  ],
  'triggerTemplate' => [
    
  ],
  'webhookConfig' => [
    'secret' => '',
    'state' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1/projects/:projectId/triggers/:triggerId", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

payload = {
    "approvalConfig": { "approvalRequired": False },
    "autodetect": False,
    "build": {
        "approval": {
            "config": {},
            "result": {
                "approvalTime": "",
                "approverAccount": "",
                "comment": "",
                "decision": "",
                "url": ""
            },
            "state": ""
        },
        "artifacts": {
            "images": [],
            "objects": {
                "location": "",
                "paths": [],
                "timing": {
                    "endTime": "",
                    "startTime": ""
                }
            }
        },
        "availableSecrets": {
            "inline": [
                {
                    "envMap": {},
                    "kmsKeyName": ""
                }
            ],
            "secretManager": [
                {
                    "env": "",
                    "versionName": ""
                }
            ]
        },
        "buildTriggerId": "",
        "createTime": "",
        "failureInfo": {
            "detail": "",
            "type": ""
        },
        "finishTime": "",
        "id": "",
        "images": [],
        "logUrl": "",
        "logsBucket": "",
        "name": "",
        "options": {
            "diskSizeGb": "",
            "dynamicSubstitutions": False,
            "env": [],
            "logStreamingOption": "",
            "logging": "",
            "machineType": "",
            "pool": { "name": "" },
            "requestedVerifyOption": "",
            "secretEnv": [],
            "sourceProvenanceHash": [],
            "substitutionOption": "",
            "volumes": [
                {
                    "name": "",
                    "path": ""
                }
            ],
            "workerPool": ""
        },
        "projectId": "",
        "queueTtl": "",
        "results": {
            "artifactManifest": "",
            "artifactTiming": {},
            "buildStepImages": [],
            "buildStepOutputs": [],
            "images": [
                {
                    "digest": "",
                    "name": "",
                    "pushTiming": {}
                }
            ],
            "numArtifacts": ""
        },
        "secrets": [
            {
                "kmsKeyName": "",
                "secretEnv": {}
            }
        ],
        "serviceAccount": "",
        "source": {
            "repoSource": {
                "branchName": "",
                "commitSha": "",
                "dir": "",
                "invertRegex": False,
                "projectId": "",
                "repoName": "",
                "substitutions": {},
                "tagName": ""
            },
            "storageSource": {
                "bucket": "",
                "generation": "",
                "object": ""
            },
            "storageSourceManifest": {
                "bucket": "",
                "generation": "",
                "object": ""
            }
        },
        "sourceProvenance": {
            "fileHashes": {},
            "resolvedRepoSource": {},
            "resolvedStorageSource": {},
            "resolvedStorageSourceManifest": {}
        },
        "startTime": "",
        "status": "",
        "statusDetail": "",
        "steps": [
            {
                "args": [],
                "dir": "",
                "entrypoint": "",
                "env": [],
                "id": "",
                "name": "",
                "pullTiming": {},
                "script": "",
                "secretEnv": [],
                "status": "",
                "timeout": "",
                "timing": {},
                "volumes": [{}],
                "waitFor": []
            }
        ],
        "substitutions": {},
        "tags": [],
        "timeout": "",
        "timing": {},
        "warnings": [
            {
                "priority": "",
                "text": ""
            }
        ]
    },
    "createTime": "",
    "description": "",
    "disabled": False,
    "filename": "",
    "filter": "",
    "gitFileSource": {
        "path": "",
        "repoType": "",
        "revision": "",
        "uri": ""
    },
    "github": {
        "enterpriseConfigResourceName": "",
        "installationId": "",
        "name": "",
        "owner": "",
        "pullRequest": {
            "branch": "",
            "commentControl": "",
            "invertRegex": False
        },
        "push": {
            "branch": "",
            "invertRegex": False,
            "tag": ""
        }
    },
    "id": "",
    "ignoredFiles": [],
    "includedFiles": [],
    "name": "",
    "pubsubConfig": {
        "serviceAccountEmail": "",
        "state": "",
        "subscription": "",
        "topic": ""
    },
    "resourceName": "",
    "serviceAccount": "",
    "sourceToBuild": {
        "ref": "",
        "repoType": "",
        "uri": ""
    },
    "substitutions": {},
    "tags": [],
    "triggerTemplate": {},
    "webhookConfig": {
        "secret": "",
        "state": ""
    }
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId"

payload <- "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/v1/projects/:projectId/triggers/:triggerId') do |req|
  req.body = "{\n  \"approvalConfig\": {\n    \"approvalRequired\": false\n  },\n  \"autodetect\": false,\n  \"build\": {\n    \"approval\": {\n      \"config\": {},\n      \"result\": {\n        \"approvalTime\": \"\",\n        \"approverAccount\": \"\",\n        \"comment\": \"\",\n        \"decision\": \"\",\n        \"url\": \"\"\n      },\n      \"state\": \"\"\n    },\n    \"artifacts\": {\n      \"images\": [],\n      \"objects\": {\n        \"location\": \"\",\n        \"paths\": [],\n        \"timing\": {\n          \"endTime\": \"\",\n          \"startTime\": \"\"\n        }\n      }\n    },\n    \"availableSecrets\": {\n      \"inline\": [\n        {\n          \"envMap\": {},\n          \"kmsKeyName\": \"\"\n        }\n      ],\n      \"secretManager\": [\n        {\n          \"env\": \"\",\n          \"versionName\": \"\"\n        }\n      ]\n    },\n    \"buildTriggerId\": \"\",\n    \"createTime\": \"\",\n    \"failureInfo\": {\n      \"detail\": \"\",\n      \"type\": \"\"\n    },\n    \"finishTime\": \"\",\n    \"id\": \"\",\n    \"images\": [],\n    \"logUrl\": \"\",\n    \"logsBucket\": \"\",\n    \"name\": \"\",\n    \"options\": {\n      \"diskSizeGb\": \"\",\n      \"dynamicSubstitutions\": false,\n      \"env\": [],\n      \"logStreamingOption\": \"\",\n      \"logging\": \"\",\n      \"machineType\": \"\",\n      \"pool\": {\n        \"name\": \"\"\n      },\n      \"requestedVerifyOption\": \"\",\n      \"secretEnv\": [],\n      \"sourceProvenanceHash\": [],\n      \"substitutionOption\": \"\",\n      \"volumes\": [\n        {\n          \"name\": \"\",\n          \"path\": \"\"\n        }\n      ],\n      \"workerPool\": \"\"\n    },\n    \"projectId\": \"\",\n    \"queueTtl\": \"\",\n    \"results\": {\n      \"artifactManifest\": \"\",\n      \"artifactTiming\": {},\n      \"buildStepImages\": [],\n      \"buildStepOutputs\": [],\n      \"images\": [\n        {\n          \"digest\": \"\",\n          \"name\": \"\",\n          \"pushTiming\": {}\n        }\n      ],\n      \"numArtifacts\": \"\"\n    },\n    \"secrets\": [\n      {\n        \"kmsKeyName\": \"\",\n        \"secretEnv\": {}\n      }\n    ],\n    \"serviceAccount\": \"\",\n    \"source\": {\n      \"repoSource\": {\n        \"branchName\": \"\",\n        \"commitSha\": \"\",\n        \"dir\": \"\",\n        \"invertRegex\": false,\n        \"projectId\": \"\",\n        \"repoName\": \"\",\n        \"substitutions\": {},\n        \"tagName\": \"\"\n      },\n      \"storageSource\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      },\n      \"storageSourceManifest\": {\n        \"bucket\": \"\",\n        \"generation\": \"\",\n        \"object\": \"\"\n      }\n    },\n    \"sourceProvenance\": {\n      \"fileHashes\": {},\n      \"resolvedRepoSource\": {},\n      \"resolvedStorageSource\": {},\n      \"resolvedStorageSourceManifest\": {}\n    },\n    \"startTime\": \"\",\n    \"status\": \"\",\n    \"statusDetail\": \"\",\n    \"steps\": [\n      {\n        \"args\": [],\n        \"dir\": \"\",\n        \"entrypoint\": \"\",\n        \"env\": [],\n        \"id\": \"\",\n        \"name\": \"\",\n        \"pullTiming\": {},\n        \"script\": \"\",\n        \"secretEnv\": [],\n        \"status\": \"\",\n        \"timeout\": \"\",\n        \"timing\": {},\n        \"volumes\": [\n          {}\n        ],\n        \"waitFor\": []\n      }\n    ],\n    \"substitutions\": {},\n    \"tags\": [],\n    \"timeout\": \"\",\n    \"timing\": {},\n    \"warnings\": [\n      {\n        \"priority\": \"\",\n        \"text\": \"\"\n      }\n    ]\n  },\n  \"createTime\": \"\",\n  \"description\": \"\",\n  \"disabled\": false,\n  \"filename\": \"\",\n  \"filter\": \"\",\n  \"gitFileSource\": {\n    \"path\": \"\",\n    \"repoType\": \"\",\n    \"revision\": \"\",\n    \"uri\": \"\"\n  },\n  \"github\": {\n    \"enterpriseConfigResourceName\": \"\",\n    \"installationId\": \"\",\n    \"name\": \"\",\n    \"owner\": \"\",\n    \"pullRequest\": {\n      \"branch\": \"\",\n      \"commentControl\": \"\",\n      \"invertRegex\": false\n    },\n    \"push\": {\n      \"branch\": \"\",\n      \"invertRegex\": false,\n      \"tag\": \"\"\n    }\n  },\n  \"id\": \"\",\n  \"ignoredFiles\": [],\n  \"includedFiles\": [],\n  \"name\": \"\",\n  \"pubsubConfig\": {\n    \"serviceAccountEmail\": \"\",\n    \"state\": \"\",\n    \"subscription\": \"\",\n    \"topic\": \"\"\n  },\n  \"resourceName\": \"\",\n  \"serviceAccount\": \"\",\n  \"sourceToBuild\": {\n    \"ref\": \"\",\n    \"repoType\": \"\",\n    \"uri\": \"\"\n  },\n  \"substitutions\": {},\n  \"tags\": [],\n  \"triggerTemplate\": {},\n  \"webhookConfig\": {\n    \"secret\": \"\",\n    \"state\": \"\"\n  }\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId";

    let payload = json!({
        "approvalConfig": json!({"approvalRequired": false}),
        "autodetect": false,
        "build": json!({
            "approval": json!({
                "config": json!({}),
                "result": json!({
                    "approvalTime": "",
                    "approverAccount": "",
                    "comment": "",
                    "decision": "",
                    "url": ""
                }),
                "state": ""
            }),
            "artifacts": json!({
                "images": (),
                "objects": json!({
                    "location": "",
                    "paths": (),
                    "timing": json!({
                        "endTime": "",
                        "startTime": ""
                    })
                })
            }),
            "availableSecrets": json!({
                "inline": (
                    json!({
                        "envMap": json!({}),
                        "kmsKeyName": ""
                    })
                ),
                "secretManager": (
                    json!({
                        "env": "",
                        "versionName": ""
                    })
                )
            }),
            "buildTriggerId": "",
            "createTime": "",
            "failureInfo": json!({
                "detail": "",
                "type": ""
            }),
            "finishTime": "",
            "id": "",
            "images": (),
            "logUrl": "",
            "logsBucket": "",
            "name": "",
            "options": json!({
                "diskSizeGb": "",
                "dynamicSubstitutions": false,
                "env": (),
                "logStreamingOption": "",
                "logging": "",
                "machineType": "",
                "pool": json!({"name": ""}),
                "requestedVerifyOption": "",
                "secretEnv": (),
                "sourceProvenanceHash": (),
                "substitutionOption": "",
                "volumes": (
                    json!({
                        "name": "",
                        "path": ""
                    })
                ),
                "workerPool": ""
            }),
            "projectId": "",
            "queueTtl": "",
            "results": json!({
                "artifactManifest": "",
                "artifactTiming": json!({}),
                "buildStepImages": (),
                "buildStepOutputs": (),
                "images": (
                    json!({
                        "digest": "",
                        "name": "",
                        "pushTiming": json!({})
                    })
                ),
                "numArtifacts": ""
            }),
            "secrets": (
                json!({
                    "kmsKeyName": "",
                    "secretEnv": json!({})
                })
            ),
            "serviceAccount": "",
            "source": json!({
                "repoSource": json!({
                    "branchName": "",
                    "commitSha": "",
                    "dir": "",
                    "invertRegex": false,
                    "projectId": "",
                    "repoName": "",
                    "substitutions": json!({}),
                    "tagName": ""
                }),
                "storageSource": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                }),
                "storageSourceManifest": json!({
                    "bucket": "",
                    "generation": "",
                    "object": ""
                })
            }),
            "sourceProvenance": json!({
                "fileHashes": json!({}),
                "resolvedRepoSource": json!({}),
                "resolvedStorageSource": json!({}),
                "resolvedStorageSourceManifest": json!({})
            }),
            "startTime": "",
            "status": "",
            "statusDetail": "",
            "steps": (
                json!({
                    "args": (),
                    "dir": "",
                    "entrypoint": "",
                    "env": (),
                    "id": "",
                    "name": "",
                    "pullTiming": json!({}),
                    "script": "",
                    "secretEnv": (),
                    "status": "",
                    "timeout": "",
                    "timing": json!({}),
                    "volumes": (json!({})),
                    "waitFor": ()
                })
            ),
            "substitutions": json!({}),
            "tags": (),
            "timeout": "",
            "timing": json!({}),
            "warnings": (
                json!({
                    "priority": "",
                    "text": ""
                })
            )
        }),
        "createTime": "",
        "description": "",
        "disabled": false,
        "filename": "",
        "filter": "",
        "gitFileSource": json!({
            "path": "",
            "repoType": "",
            "revision": "",
            "uri": ""
        }),
        "github": json!({
            "enterpriseConfigResourceName": "",
            "installationId": "",
            "name": "",
            "owner": "",
            "pullRequest": json!({
                "branch": "",
                "commentControl": "",
                "invertRegex": false
            }),
            "push": json!({
                "branch": "",
                "invertRegex": false,
                "tag": ""
            })
        }),
        "id": "",
        "ignoredFiles": (),
        "includedFiles": (),
        "name": "",
        "pubsubConfig": json!({
            "serviceAccountEmail": "",
            "state": "",
            "subscription": "",
            "topic": ""
        }),
        "resourceName": "",
        "serviceAccount": "",
        "sourceToBuild": json!({
            "ref": "",
            "repoType": "",
            "uri": ""
        }),
        "substitutions": json!({}),
        "tags": (),
        "triggerTemplate": json!({}),
        "webhookConfig": json!({
            "secret": "",
            "state": ""
        })
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId \
  --header 'content-type: application/json' \
  --data '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}'
echo '{
  "approvalConfig": {
    "approvalRequired": false
  },
  "autodetect": false,
  "build": {
    "approval": {
      "config": {},
      "result": {
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      },
      "state": ""
    },
    "artifacts": {
      "images": [],
      "objects": {
        "location": "",
        "paths": [],
        "timing": {
          "endTime": "",
          "startTime": ""
        }
      }
    },
    "availableSecrets": {
      "inline": [
        {
          "envMap": {},
          "kmsKeyName": ""
        }
      ],
      "secretManager": [
        {
          "env": "",
          "versionName": ""
        }
      ]
    },
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": {
      "detail": "",
      "type": ""
    },
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": {
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": {
        "name": ""
      },
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        {
          "name": "",
          "path": ""
        }
      ],
      "workerPool": ""
    },
    "projectId": "",
    "queueTtl": "",
    "results": {
      "artifactManifest": "",
      "artifactTiming": {},
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        {
          "digest": "",
          "name": "",
          "pushTiming": {}
        }
      ],
      "numArtifacts": ""
    },
    "secrets": [
      {
        "kmsKeyName": "",
        "secretEnv": {}
      }
    ],
    "serviceAccount": "",
    "source": {
      "repoSource": {
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": {},
        "tagName": ""
      },
      "storageSource": {
        "bucket": "",
        "generation": "",
        "object": ""
      },
      "storageSourceManifest": {
        "bucket": "",
        "generation": "",
        "object": ""
      }
    },
    "sourceProvenance": {
      "fileHashes": {},
      "resolvedRepoSource": {},
      "resolvedStorageSource": {},
      "resolvedStorageSourceManifest": {}
    },
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      {
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": {},
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": {},
        "volumes": [
          {}
        ],
        "waitFor": []
      }
    ],
    "substitutions": {},
    "tags": [],
    "timeout": "",
    "timing": {},
    "warnings": [
      {
        "priority": "",
        "text": ""
      }
    ]
  },
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": {
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  },
  "github": {
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": {
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    },
    "push": {
      "branch": "",
      "invertRegex": false,
      "tag": ""
    }
  },
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": {
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  },
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": {
    "ref": "",
    "repoType": "",
    "uri": ""
  },
  "substitutions": {},
  "tags": [],
  "triggerTemplate": {},
  "webhookConfig": {
    "secret": "",
    "state": ""
  }
}' |  \
  http PATCH {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "approvalConfig": {\n    "approvalRequired": false\n  },\n  "autodetect": false,\n  "build": {\n    "approval": {\n      "config": {},\n      "result": {\n        "approvalTime": "",\n        "approverAccount": "",\n        "comment": "",\n        "decision": "",\n        "url": ""\n      },\n      "state": ""\n    },\n    "artifacts": {\n      "images": [],\n      "objects": {\n        "location": "",\n        "paths": [],\n        "timing": {\n          "endTime": "",\n          "startTime": ""\n        }\n      }\n    },\n    "availableSecrets": {\n      "inline": [\n        {\n          "envMap": {},\n          "kmsKeyName": ""\n        }\n      ],\n      "secretManager": [\n        {\n          "env": "",\n          "versionName": ""\n        }\n      ]\n    },\n    "buildTriggerId": "",\n    "createTime": "",\n    "failureInfo": {\n      "detail": "",\n      "type": ""\n    },\n    "finishTime": "",\n    "id": "",\n    "images": [],\n    "logUrl": "",\n    "logsBucket": "",\n    "name": "",\n    "options": {\n      "diskSizeGb": "",\n      "dynamicSubstitutions": false,\n      "env": [],\n      "logStreamingOption": "",\n      "logging": "",\n      "machineType": "",\n      "pool": {\n        "name": ""\n      },\n      "requestedVerifyOption": "",\n      "secretEnv": [],\n      "sourceProvenanceHash": [],\n      "substitutionOption": "",\n      "volumes": [\n        {\n          "name": "",\n          "path": ""\n        }\n      ],\n      "workerPool": ""\n    },\n    "projectId": "",\n    "queueTtl": "",\n    "results": {\n      "artifactManifest": "",\n      "artifactTiming": {},\n      "buildStepImages": [],\n      "buildStepOutputs": [],\n      "images": [\n        {\n          "digest": "",\n          "name": "",\n          "pushTiming": {}\n        }\n      ],\n      "numArtifacts": ""\n    },\n    "secrets": [\n      {\n        "kmsKeyName": "",\n        "secretEnv": {}\n      }\n    ],\n    "serviceAccount": "",\n    "source": {\n      "repoSource": {\n        "branchName": "",\n        "commitSha": "",\n        "dir": "",\n        "invertRegex": false,\n        "projectId": "",\n        "repoName": "",\n        "substitutions": {},\n        "tagName": ""\n      },\n      "storageSource": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      },\n      "storageSourceManifest": {\n        "bucket": "",\n        "generation": "",\n        "object": ""\n      }\n    },\n    "sourceProvenance": {\n      "fileHashes": {},\n      "resolvedRepoSource": {},\n      "resolvedStorageSource": {},\n      "resolvedStorageSourceManifest": {}\n    },\n    "startTime": "",\n    "status": "",\n    "statusDetail": "",\n    "steps": [\n      {\n        "args": [],\n        "dir": "",\n        "entrypoint": "",\n        "env": [],\n        "id": "",\n        "name": "",\n        "pullTiming": {},\n        "script": "",\n        "secretEnv": [],\n        "status": "",\n        "timeout": "",\n        "timing": {},\n        "volumes": [\n          {}\n        ],\n        "waitFor": []\n      }\n    ],\n    "substitutions": {},\n    "tags": [],\n    "timeout": "",\n    "timing": {},\n    "warnings": [\n      {\n        "priority": "",\n        "text": ""\n      }\n    ]\n  },\n  "createTime": "",\n  "description": "",\n  "disabled": false,\n  "filename": "",\n  "filter": "",\n  "gitFileSource": {\n    "path": "",\n    "repoType": "",\n    "revision": "",\n    "uri": ""\n  },\n  "github": {\n    "enterpriseConfigResourceName": "",\n    "installationId": "",\n    "name": "",\n    "owner": "",\n    "pullRequest": {\n      "branch": "",\n      "commentControl": "",\n      "invertRegex": false\n    },\n    "push": {\n      "branch": "",\n      "invertRegex": false,\n      "tag": ""\n    }\n  },\n  "id": "",\n  "ignoredFiles": [],\n  "includedFiles": [],\n  "name": "",\n  "pubsubConfig": {\n    "serviceAccountEmail": "",\n    "state": "",\n    "subscription": "",\n    "topic": ""\n  },\n  "resourceName": "",\n  "serviceAccount": "",\n  "sourceToBuild": {\n    "ref": "",\n    "repoType": "",\n    "uri": ""\n  },\n  "substitutions": {},\n  "tags": [],\n  "triggerTemplate": {},\n  "webhookConfig": {\n    "secret": "",\n    "state": ""\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/projects/:projectId/triggers/:triggerId
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "approvalConfig": ["approvalRequired": false],
  "autodetect": false,
  "build": [
    "approval": [
      "config": [],
      "result": [
        "approvalTime": "",
        "approverAccount": "",
        "comment": "",
        "decision": "",
        "url": ""
      ],
      "state": ""
    ],
    "artifacts": [
      "images": [],
      "objects": [
        "location": "",
        "paths": [],
        "timing": [
          "endTime": "",
          "startTime": ""
        ]
      ]
    ],
    "availableSecrets": [
      "inline": [
        [
          "envMap": [],
          "kmsKeyName": ""
        ]
      ],
      "secretManager": [
        [
          "env": "",
          "versionName": ""
        ]
      ]
    ],
    "buildTriggerId": "",
    "createTime": "",
    "failureInfo": [
      "detail": "",
      "type": ""
    ],
    "finishTime": "",
    "id": "",
    "images": [],
    "logUrl": "",
    "logsBucket": "",
    "name": "",
    "options": [
      "diskSizeGb": "",
      "dynamicSubstitutions": false,
      "env": [],
      "logStreamingOption": "",
      "logging": "",
      "machineType": "",
      "pool": ["name": ""],
      "requestedVerifyOption": "",
      "secretEnv": [],
      "sourceProvenanceHash": [],
      "substitutionOption": "",
      "volumes": [
        [
          "name": "",
          "path": ""
        ]
      ],
      "workerPool": ""
    ],
    "projectId": "",
    "queueTtl": "",
    "results": [
      "artifactManifest": "",
      "artifactTiming": [],
      "buildStepImages": [],
      "buildStepOutputs": [],
      "images": [
        [
          "digest": "",
          "name": "",
          "pushTiming": []
        ]
      ],
      "numArtifacts": ""
    ],
    "secrets": [
      [
        "kmsKeyName": "",
        "secretEnv": []
      ]
    ],
    "serviceAccount": "",
    "source": [
      "repoSource": [
        "branchName": "",
        "commitSha": "",
        "dir": "",
        "invertRegex": false,
        "projectId": "",
        "repoName": "",
        "substitutions": [],
        "tagName": ""
      ],
      "storageSource": [
        "bucket": "",
        "generation": "",
        "object": ""
      ],
      "storageSourceManifest": [
        "bucket": "",
        "generation": "",
        "object": ""
      ]
    ],
    "sourceProvenance": [
      "fileHashes": [],
      "resolvedRepoSource": [],
      "resolvedStorageSource": [],
      "resolvedStorageSourceManifest": []
    ],
    "startTime": "",
    "status": "",
    "statusDetail": "",
    "steps": [
      [
        "args": [],
        "dir": "",
        "entrypoint": "",
        "env": [],
        "id": "",
        "name": "",
        "pullTiming": [],
        "script": "",
        "secretEnv": [],
        "status": "",
        "timeout": "",
        "timing": [],
        "volumes": [[]],
        "waitFor": []
      ]
    ],
    "substitutions": [],
    "tags": [],
    "timeout": "",
    "timing": [],
    "warnings": [
      [
        "priority": "",
        "text": ""
      ]
    ]
  ],
  "createTime": "",
  "description": "",
  "disabled": false,
  "filename": "",
  "filter": "",
  "gitFileSource": [
    "path": "",
    "repoType": "",
    "revision": "",
    "uri": ""
  ],
  "github": [
    "enterpriseConfigResourceName": "",
    "installationId": "",
    "name": "",
    "owner": "",
    "pullRequest": [
      "branch": "",
      "commentControl": "",
      "invertRegex": false
    ],
    "push": [
      "branch": "",
      "invertRegex": false,
      "tag": ""
    ]
  ],
  "id": "",
  "ignoredFiles": [],
  "includedFiles": [],
  "name": "",
  "pubsubConfig": [
    "serviceAccountEmail": "",
    "state": "",
    "subscription": "",
    "topic": ""
  ],
  "resourceName": "",
  "serviceAccount": "",
  "sourceToBuild": [
    "ref": "",
    "repoType": "",
    "uri": ""
  ],
  "substitutions": [],
  "tags": [],
  "triggerTemplate": [],
  "webhookConfig": [
    "secret": "",
    "state": ""
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/projects/:projectId/triggers/:triggerId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
PATCH Updates a `WorkerPool`.
{{baseUrl}}/v1/:name
QUERY PARAMS

name
BODY json

{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/v1/:name" {:content-type :json
                                                      :form-params {:annotations {}
                                                                    :createTime ""
                                                                    :deleteTime ""
                                                                    :displayName ""
                                                                    :etag ""
                                                                    :name ""
                                                                    :privatePoolV1Config {:networkConfig {:egressOption ""
                                                                                                          :peeredNetwork ""}
                                                                                          :workerConfig {:diskSizeGb ""
                                                                                                         :machineType ""}}
                                                                    :state ""
                                                                    :uid ""
                                                                    :updateTime ""}})
require "http/client"

url = "{{baseUrl}}/v1/:name"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/v1/:name"),
    Content = new StringContent("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/:name"

	payload := strings.NewReader("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/v1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 350

{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:name")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/:name"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/:name")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:name")
  .header("content-type", "application/json")
  .body("{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  annotations: {},
  createTime: '',
  deleteTime: '',
  displayName: '',
  etag: '',
  name: '',
  privatePoolV1Config: {
    networkConfig: {
      egressOption: '',
      peeredNetwork: ''
    },
    workerConfig: {
      diskSizeGb: '',
      machineType: ''
    }
  },
  state: '',
  uid: '',
  updateTime: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/v1/:name');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/:name',
  headers: {'content-type': 'application/json'},
  data: {
    annotations: {},
    createTime: '',
    deleteTime: '',
    displayName: '',
    etag: '',
    name: '',
    privatePoolV1Config: {
      networkConfig: {egressOption: '', peeredNetwork: ''},
      workerConfig: {diskSizeGb: '', machineType: ''}
    },
    state: '',
    uid: '',
    updateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"annotations":{},"createTime":"","deleteTime":"","displayName":"","etag":"","name":"","privatePoolV1Config":{"networkConfig":{"egressOption":"","peeredNetwork":""},"workerConfig":{"diskSizeGb":"","machineType":""}},"state":"","uid":"","updateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/:name',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "annotations": {},\n  "createTime": "",\n  "deleteTime": "",\n  "displayName": "",\n  "etag": "",\n  "name": "",\n  "privatePoolV1Config": {\n    "networkConfig": {\n      "egressOption": "",\n      "peeredNetwork": ""\n    },\n    "workerConfig": {\n      "diskSizeGb": "",\n      "machineType": ""\n    }\n  },\n  "state": "",\n  "uid": "",\n  "updateTime": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/:name")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/:name',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  annotations: {},
  createTime: '',
  deleteTime: '',
  displayName: '',
  etag: '',
  name: '',
  privatePoolV1Config: {
    networkConfig: {egressOption: '', peeredNetwork: ''},
    workerConfig: {diskSizeGb: '', machineType: ''}
  },
  state: '',
  uid: '',
  updateTime: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/:name',
  headers: {'content-type': 'application/json'},
  body: {
    annotations: {},
    createTime: '',
    deleteTime: '',
    displayName: '',
    etag: '',
    name: '',
    privatePoolV1Config: {
      networkConfig: {egressOption: '', peeredNetwork: ''},
      workerConfig: {diskSizeGb: '', machineType: ''}
    },
    state: '',
    uid: '',
    updateTime: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/v1/:name');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  annotations: {},
  createTime: '',
  deleteTime: '',
  displayName: '',
  etag: '',
  name: '',
  privatePoolV1Config: {
    networkConfig: {
      egressOption: '',
      peeredNetwork: ''
    },
    workerConfig: {
      diskSizeGb: '',
      machineType: ''
    }
  },
  state: '',
  uid: '',
  updateTime: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/v1/:name',
  headers: {'content-type': 'application/json'},
  data: {
    annotations: {},
    createTime: '',
    deleteTime: '',
    displayName: '',
    etag: '',
    name: '',
    privatePoolV1Config: {
      networkConfig: {egressOption: '', peeredNetwork: ''},
      workerConfig: {diskSizeGb: '', machineType: ''}
    },
    state: '',
    uid: '',
    updateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/:name';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"annotations":{},"createTime":"","deleteTime":"","displayName":"","etag":"","name":"","privatePoolV1Config":{"networkConfig":{"egressOption":"","peeredNetwork":""},"workerConfig":{"diskSizeGb":"","machineType":""}},"state":"","uid":"","updateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"annotations": @{  },
                              @"createTime": @"",
                              @"deleteTime": @"",
                              @"displayName": @"",
                              @"etag": @"",
                              @"name": @"",
                              @"privatePoolV1Config": @{ @"networkConfig": @{ @"egressOption": @"", @"peeredNetwork": @"" }, @"workerConfig": @{ @"diskSizeGb": @"", @"machineType": @"" } },
                              @"state": @"",
                              @"uid": @"",
                              @"updateTime": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/:name",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'annotations' => [
        
    ],
    'createTime' => '',
    'deleteTime' => '',
    'displayName' => '',
    'etag' => '',
    'name' => '',
    'privatePoolV1Config' => [
        'networkConfig' => [
                'egressOption' => '',
                'peeredNetwork' => ''
        ],
        'workerConfig' => [
                'diskSizeGb' => '',
                'machineType' => ''
        ]
    ],
    'state' => '',
    'uid' => '',
    'updateTime' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/v1/:name', [
  'body' => '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'annotations' => [
    
  ],
  'createTime' => '',
  'deleteTime' => '',
  'displayName' => '',
  'etag' => '',
  'name' => '',
  'privatePoolV1Config' => [
    'networkConfig' => [
        'egressOption' => '',
        'peeredNetwork' => ''
    ],
    'workerConfig' => [
        'diskSizeGb' => '',
        'machineType' => ''
    ]
  ],
  'state' => '',
  'uid' => '',
  'updateTime' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'annotations' => [
    
  ],
  'createTime' => '',
  'deleteTime' => '',
  'displayName' => '',
  'etag' => '',
  'name' => '',
  'privatePoolV1Config' => [
    'networkConfig' => [
        'egressOption' => '',
        'peeredNetwork' => ''
    ],
    'workerConfig' => [
        'diskSizeGb' => '',
        'machineType' => ''
    ]
  ],
  'state' => '',
  'uid' => '',
  'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/v1/:name", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/:name"

payload = {
    "annotations": {},
    "createTime": "",
    "deleteTime": "",
    "displayName": "",
    "etag": "",
    "name": "",
    "privatePoolV1Config": {
        "networkConfig": {
            "egressOption": "",
            "peeredNetwork": ""
        },
        "workerConfig": {
            "diskSizeGb": "",
            "machineType": ""
        }
    },
    "state": "",
    "uid": "",
    "updateTime": ""
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/:name"

payload <- "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/:name")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/v1/:name') do |req|
  req.body = "{\n  \"annotations\": {},\n  \"createTime\": \"\",\n  \"deleteTime\": \"\",\n  \"displayName\": \"\",\n  \"etag\": \"\",\n  \"name\": \"\",\n  \"privatePoolV1Config\": {\n    \"networkConfig\": {\n      \"egressOption\": \"\",\n      \"peeredNetwork\": \"\"\n    },\n    \"workerConfig\": {\n      \"diskSizeGb\": \"\",\n      \"machineType\": \"\"\n    }\n  },\n  \"state\": \"\",\n  \"uid\": \"\",\n  \"updateTime\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/:name";

    let payload = json!({
        "annotations": json!({}),
        "createTime": "",
        "deleteTime": "",
        "displayName": "",
        "etag": "",
        "name": "",
        "privatePoolV1Config": json!({
            "networkConfig": json!({
                "egressOption": "",
                "peeredNetwork": ""
            }),
            "workerConfig": json!({
                "diskSizeGb": "",
                "machineType": ""
            })
        }),
        "state": "",
        "uid": "",
        "updateTime": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/v1/:name \
  --header 'content-type: application/json' \
  --data '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}'
echo '{
  "annotations": {},
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": {
    "networkConfig": {
      "egressOption": "",
      "peeredNetwork": ""
    },
    "workerConfig": {
      "diskSizeGb": "",
      "machineType": ""
    }
  },
  "state": "",
  "uid": "",
  "updateTime": ""
}' |  \
  http PATCH {{baseUrl}}/v1/:name \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "annotations": {},\n  "createTime": "",\n  "deleteTime": "",\n  "displayName": "",\n  "etag": "",\n  "name": "",\n  "privatePoolV1Config": {\n    "networkConfig": {\n      "egressOption": "",\n      "peeredNetwork": ""\n    },\n    "workerConfig": {\n      "diskSizeGb": "",\n      "machineType": ""\n    }\n  },\n  "state": "",\n  "uid": "",\n  "updateTime": ""\n}' \
  --output-document \
  - {{baseUrl}}/v1/:name
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "annotations": [],
  "createTime": "",
  "deleteTime": "",
  "displayName": "",
  "etag": "",
  "name": "",
  "privatePoolV1Config": [
    "networkConfig": [
      "egressOption": "",
      "peeredNetwork": ""
    ],
    "workerConfig": [
      "diskSizeGb": "",
      "machineType": ""
    ]
  ],
  "state": "",
  "uid": "",
  "updateTime": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST ReceiveWebhook is called when the API receives a GitHub webhook.
{{baseUrl}}/v1/webhook
BODY json

{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/webhook");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/webhook" {:content-type :json
                                                       :form-params {:contentType ""
                                                                     :data ""
                                                                     :extensions [{}]}})
require "http/client"

url = "{{baseUrl}}/v1/webhook"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/webhook"),
    Content = new StringContent("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/webhook");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/webhook"

	payload := strings.NewReader("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/webhook HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67

{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/webhook")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/webhook"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/webhook")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/webhook")
  .header("content-type", "application/json")
  .body("{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
  .asString();
const data = JSON.stringify({
  contentType: '',
  data: '',
  extensions: [
    {}
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/webhook');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/webhook',
  headers: {'content-type': 'application/json'},
  data: {contentType: '', data: '', extensions: [{}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/webhook';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contentType":"","data":"","extensions":[{}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/webhook',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "contentType": "",\n  "data": "",\n  "extensions": [\n    {}\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/webhook")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/webhook',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({contentType: '', data: '', extensions: [{}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/webhook',
  headers: {'content-type': 'application/json'},
  body: {contentType: '', data: '', extensions: [{}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/webhook');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  contentType: '',
  data: '',
  extensions: [
    {}
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/webhook',
  headers: {'content-type': 'application/json'},
  data: {contentType: '', data: '', extensions: [{}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/webhook';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"contentType":"","data":"","extensions":[{}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"contentType": @"",
                              @"data": @"",
                              @"extensions": @[ @{  } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/webhook"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/webhook" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/webhook",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'contentType' => '',
    'data' => '',
    'extensions' => [
        [
                
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/webhook', [
  'body' => '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/webhook');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'contentType' => '',
  'data' => '',
  'extensions' => [
    [
        
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'contentType' => '',
  'data' => '',
  'extensions' => [
    [
        
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/webhook');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/webhook", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/webhook"

payload = {
    "contentType": "",
    "data": "",
    "extensions": [{}]
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/webhook"

payload <- "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/webhook")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/webhook') do |req|
  req.body = "{\n  \"contentType\": \"\",\n  \"data\": \"\",\n  \"extensions\": [\n    {}\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/webhook";

    let payload = json!({
        "contentType": "",
        "data": "",
        "extensions": (json!({}))
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/webhook \
  --header 'content-type: application/json' \
  --data '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}'
echo '{
  "contentType": "",
  "data": "",
  "extensions": [
    {}
  ]
}' |  \
  http POST {{baseUrl}}/v1/webhook \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "contentType": "",\n  "data": "",\n  "extensions": [\n    {}\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/v1/webhook
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "contentType": "",
  "data": "",
  "extensions": [[]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/webhook")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()