Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 336 additions & 8 deletions java/scripts/codegen/java.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionApproved` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionApproved extends PermissionResult {

@JsonProperty("kind")
private final String kind = "approved";

@Override
public String getKind() { return kind; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionApprovedForLocation` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionApprovedForLocation extends PermissionResult {

@JsonProperty("kind")
private final String kind = "approved-for-location";

@Override
public String getKind() { return kind; }

/** The approval to persist for this location */
@JsonProperty("approval")
private UserToolSessionApproval approval;

/** The location key (git root or cwd) to persist the approval to */
@JsonProperty("locationKey")
private String locationKey;

public UserToolSessionApproval getApproval() { return approval; }
public void setApproval(UserToolSessionApproval approval) { this.approval = approval; }

public String getLocationKey() { return locationKey; }
public void setLocationKey(String locationKey) { this.locationKey = locationKey; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionApprovedForSession` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionApprovedForSession extends PermissionResult {

@JsonProperty("kind")
private final String kind = "approved-for-session";

@Override
public String getKind() { return kind; }

/** The approval to add as a session-scoped rule */
@JsonProperty("approval")
private UserToolSessionApproval approval;

public UserToolSessionApproval getApproval() { return approval; }
public void setApproval(UserToolSessionApproval approval) { this.approval = approval; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionCancelled` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionCancelled extends PermissionResult {

@JsonProperty("kind")
private final String kind = "cancelled";

@Override
public String getKind() { return kind; }

/** Optional explanation of why the request was cancelled */
@JsonProperty("reason")
private String reason;

public String getReason() { return reason; }
public void setReason(String reason) { this.reason = reason; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionDeniedByContentExclusionPolicy` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionDeniedByContentExclusionPolicy extends PermissionResult {

@JsonProperty("kind")
private final String kind = "denied-by-content-exclusion-policy";

@Override
public String getKind() { return kind; }

/** File path that triggered the exclusion */
@JsonProperty("path")
private String path;

/** Human-readable explanation of why the path was excluded */
@JsonProperty("message")
private String message;

public String getPath() { return path; }
public void setPath(String path) { this.path = path; }

public String getMessage() { return message; }
public void setMessage(String message) { this.message = message; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionDeniedByPermissionRequestHook` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionDeniedByPermissionRequestHook extends PermissionResult {

@JsonProperty("kind")
private final String kind = "denied-by-permission-request-hook";

@Override
public String getKind() { return kind; }

/** Optional message from the hook explaining the denial */
@JsonProperty("message")
private String message;

/** Whether to interrupt the current agent turn */
@JsonProperty("interrupt")
private Boolean interrupt;

public String getMessage() { return message; }
public void setMessage(String message) { this.message = message; }

public Boolean getInterrupt() { return interrupt; }
public void setInterrupt(Boolean interrupt) { this.interrupt = interrupt; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionDeniedByRules` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionDeniedByRules extends PermissionResult {

@JsonProperty("kind")
private final String kind = "denied-by-rules";

@Override
public String getKind() { return kind; }

/** Rules that denied the request */
@JsonProperty("rules")
private List<PermissionRule> rules;

public List<PermissionRule> getRules() { return rules; }
public void setRules(List<PermissionRule> rules) { this.rules = rules; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionDeniedInteractivelyByUser` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionDeniedInteractivelyByUser extends PermissionResult {

@JsonProperty("kind")
private final String kind = "denied-interactively-by-user";

@Override
public String getKind() { return kind; }

/** Optional feedback from the user explaining the denial */
@JsonProperty("feedback")
private String feedback;

/** Whether to force-reject the current agent turn */
@JsonProperty("forceReject")
private Boolean forceReject;

public String getFeedback() { return feedback; }
public void setFeedback(String feedback) { this.feedback = feedback; }

public Boolean getForceReject() { return forceReject; }
public void setForceReject(Boolean forceReject) { this.forceReject = forceReject; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/

// AUTO-GENERATED FILE - DO NOT EDIT
// Generated from: api.schema.json

package com.github.copilot.generated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.annotation.processing.Generated;

/**
* Schema for the `PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser` type.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@javax.annotation.processing.Generated("copilot-sdk-codegen")
public final class PermissionDeniedNoApprovalRuleAndCouldNotRequestFromUser extends PermissionResult {

@JsonProperty("kind")
private final String kind = "denied-no-approval-rule-and-could-not-request-from-user";

@Override
public String getKind() { return kind; }
}
Loading
Loading