// @generated by protoc-gen-es v1.7.2 with parameter "target=ts"
// @generated from file flyteidl/service/auth.proto (package flyteidl.service, syntax proto3)
/* eslint-disable */
// @ts-nocheck

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";

/**
 * @generated from message flyteidl.service.OAuth2MetadataRequest
 */
export class OAuth2MetadataRequest extends Message<OAuth2MetadataRequest> {
  constructor(data?: PartialMessage<OAuth2MetadataRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.service.OAuth2MetadataRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OAuth2MetadataRequest {
    return new OAuth2MetadataRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OAuth2MetadataRequest {
    return new OAuth2MetadataRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OAuth2MetadataRequest {
    return new OAuth2MetadataRequest().fromJsonString(jsonString, options);
  }

  static equals(a: OAuth2MetadataRequest | PlainMessage<OAuth2MetadataRequest> | undefined, b: OAuth2MetadataRequest | PlainMessage<OAuth2MetadataRequest> | undefined): boolean {
    return proto3.util.equals(OAuth2MetadataRequest, a, b);
  }
}

/**
 * OAuth2MetadataResponse defines an RFC-Compliant response for /.well-known/oauth-authorization-server metadata
 * as defined in https://tools.ietf.org/html/rfc8414
 *
 * @generated from message flyteidl.service.OAuth2MetadataResponse
 */
export class OAuth2MetadataResponse extends Message<OAuth2MetadataResponse> {
  /**
   * Defines the issuer string in all JWT tokens this server issues. The issuer can be admin itself or an external
   * issuer.
   *
   * @generated from field: string issuer = 1;
   */
  issuer = "";

  /**
   * URL of the authorization server's authorization endpoint [RFC6749]. This is REQUIRED unless no grant types are
   * supported that use the authorization endpoint.
   *
   * @generated from field: string authorization_endpoint = 2;
   */
  authorizationEndpoint = "";

  /**
   * URL of the authorization server's token endpoint [RFC6749].
   *
   * @generated from field: string token_endpoint = 3;
   */
  tokenEndpoint = "";

  /**
   * Array containing a list of the OAuth 2.0 response_type values that this authorization server supports.
   *
   * @generated from field: repeated string response_types_supported = 4;
   */
  responseTypesSupported: string[] = [];

  /**
   * JSON array containing a list of the OAuth 2.0 [RFC6749] scope values that this authorization server supports.
   *
   * @generated from field: repeated string scopes_supported = 5;
   */
  scopesSupported: string[] = [];

  /**
   * JSON array containing a list of client authentication methods supported by this token endpoint.
   *
   * @generated from field: repeated string token_endpoint_auth_methods_supported = 6;
   */
  tokenEndpointAuthMethodsSupported: string[] = [];

  /**
   * URL of the authorization server's JWK Set [JWK] document. The referenced document contains the signing key(s) the
   * client uses to validate signatures from the authorization server.
   *
   * @generated from field: string jwks_uri = 7;
   */
  jwksUri = "";

  /**
   * JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by
   * this authorization server.
   *
   * @generated from field: repeated string code_challenge_methods_supported = 8;
   */
  codeChallengeMethodsSupported: string[] = [];

  /**
   * JSON array containing a list of the OAuth 2.0 grant type values that this authorization server supports.
   *
   * @generated from field: repeated string grant_types_supported = 9;
   */
  grantTypesSupported: string[] = [];

  /**
   * URL of the authorization server's device authorization endpoint, as defined in Section 3.1 of [RFC8628]
   *
   * @generated from field: string device_authorization_endpoint = 10;
   */
  deviceAuthorizationEndpoint = "";

  constructor(data?: PartialMessage<OAuth2MetadataResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.service.OAuth2MetadataResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "issuer", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "authorization_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "token_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 4, name: "response_types_supported", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 5, name: "scopes_supported", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 6, name: "token_endpoint_auth_methods_supported", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 7, name: "jwks_uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 8, name: "code_challenge_methods_supported", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 9, name: "grant_types_supported", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 10, name: "device_authorization_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OAuth2MetadataResponse {
    return new OAuth2MetadataResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OAuth2MetadataResponse {
    return new OAuth2MetadataResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OAuth2MetadataResponse {
    return new OAuth2MetadataResponse().fromJsonString(jsonString, options);
  }

  static equals(a: OAuth2MetadataResponse | PlainMessage<OAuth2MetadataResponse> | undefined, b: OAuth2MetadataResponse | PlainMessage<OAuth2MetadataResponse> | undefined): boolean {
    return proto3.util.equals(OAuth2MetadataResponse, a, b);
  }
}

/**
 * @generated from message flyteidl.service.PublicClientAuthConfigRequest
 */
export class PublicClientAuthConfigRequest extends Message<PublicClientAuthConfigRequest> {
  constructor(data?: PartialMessage<PublicClientAuthConfigRequest>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.service.PublicClientAuthConfigRequest";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublicClientAuthConfigRequest {
    return new PublicClientAuthConfigRequest().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublicClientAuthConfigRequest {
    return new PublicClientAuthConfigRequest().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublicClientAuthConfigRequest {
    return new PublicClientAuthConfigRequest().fromJsonString(jsonString, options);
  }

  static equals(a: PublicClientAuthConfigRequest | PlainMessage<PublicClientAuthConfigRequest> | undefined, b: PublicClientAuthConfigRequest | PlainMessage<PublicClientAuthConfigRequest> | undefined): boolean {
    return proto3.util.equals(PublicClientAuthConfigRequest, a, b);
  }
}

/**
 * FlyteClientResponse encapsulates public information that flyte clients (CLIs... etc.) can use to authenticate users.
 *
 * @generated from message flyteidl.service.PublicClientAuthConfigResponse
 */
export class PublicClientAuthConfigResponse extends Message<PublicClientAuthConfigResponse> {
  /**
   * client_id to use when initiating OAuth2 authorization requests.
   *
   * @generated from field: string client_id = 1;
   */
  clientId = "";

  /**
   * redirect uri to use when initiating OAuth2 authorization requests.
   *
   * @generated from field: string redirect_uri = 2;
   */
  redirectUri = "";

  /**
   * scopes to request when initiating OAuth2 authorization requests.
   *
   * @generated from field: repeated string scopes = 3;
   */
  scopes: string[] = [];

  /**
   * Authorization Header to use when passing Access Tokens to the server. If not provided, the client should use the
   * default http `Authorization` header.
   *
   * @generated from field: string authorization_metadata_key = 4;
   */
  authorizationMetadataKey = "";

  /**
   * ServiceHttpEndpoint points to the http endpoint for the backend. If empty, clients can assume the endpoint used
   * to configure the gRPC connection can be used for the http one respecting the insecure flag to choose between
   * SSL or no SSL connections.
   *
   * @generated from field: string service_http_endpoint = 5;
   */
  serviceHttpEndpoint = "";

  /**
   * audience to use when initiating OAuth2 authorization requests.
   *
   * @generated from field: string audience = 6;
   */
  audience = "";

  constructor(data?: PartialMessage<PublicClientAuthConfigResponse>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "flyteidl.service.PublicClientAuthConfigResponse";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "client_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 2, name: "redirect_uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 3, name: "scopes", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 4, name: "authorization_metadata_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 5, name: "service_http_endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 6, name: "audience", kind: "scalar", T: 9 /* ScalarType.STRING */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PublicClientAuthConfigResponse {
    return new PublicClientAuthConfigResponse().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PublicClientAuthConfigResponse {
    return new PublicClientAuthConfigResponse().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PublicClientAuthConfigResponse {
    return new PublicClientAuthConfigResponse().fromJsonString(jsonString, options);
  }

  static equals(a: PublicClientAuthConfigResponse | PlainMessage<PublicClientAuthConfigResponse> | undefined, b: PublicClientAuthConfigResponse | PlainMessage<PublicClientAuthConfigResponse> | undefined): boolean {
    return proto3.util.equals(PublicClientAuthConfigResponse, a, b);
  }
}

