mirror of
https://github.com/openziti/zrok.git
synced 2025-06-28 21:51:26 +02:00
list public frontends for account implementation (#996)
This commit is contained in:
parent
ac95ebd2f7
commit
f6d1b01ef0
@ -95,6 +95,7 @@ func Run(inCfg *config.Config) error {
|
||||
api.MetadataGetShareDetailHandler = newShareDetailHandler()
|
||||
api.MetadataListMembershipsHandler = newListMembershipsHandler()
|
||||
api.MetadataListOrgMembersHandler = newListOrgMembersHandler()
|
||||
api.MetadataListPublicFrontendsForAccountHandler = newListPublicFrontendsForAccountHandler()
|
||||
api.MetadataOrgAccountOverviewHandler = newOrgAccountOverviewHandler()
|
||||
api.MetadataOverviewHandler = newOverviewHandler()
|
||||
api.MetadataVersionHandler = metadata.VersionHandlerFunc(versionHandler)
|
||||
|
@ -16,7 +16,7 @@ func newListMembershipsHandler() *listMembershipsHandler {
|
||||
func (h *listMembershipsHandler) Handle(_ metadata.ListMembershipsParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
||||
trx, err := str.Begin()
|
||||
if err != nil {
|
||||
logrus.Errorf("error startin transaction: %v", err)
|
||||
logrus.Errorf("error starting transaction: %v", err)
|
||||
return metadata.NewListMembershipsInternalServerError()
|
||||
}
|
||||
defer func() { _ = trx.Rollback() }()
|
||||
|
52
controller/listPublicFrontendsForAccount.go
Normal file
52
controller/listPublicFrontendsForAccount.go
Normal file
@ -0,0 +1,52 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/openziti/zrok/rest_model_zrok"
|
||||
"github.com/openziti/zrok/rest_server_zrok/operations/metadata"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type listPublicFrontendsForAccountHandler struct{}
|
||||
|
||||
func newListPublicFrontendsForAccountHandler() *listPublicFrontendsForAccountHandler {
|
||||
return &listPublicFrontendsForAccountHandler{}
|
||||
}
|
||||
|
||||
func (h *listPublicFrontendsForAccountHandler) Handle(_ metadata.ListPublicFrontendsForAccountParams, principal *rest_model_zrok.Principal) middleware.Responder {
|
||||
trx, err := str.Begin()
|
||||
if err != nil {
|
||||
logrus.Errorf("error starting transaction: %v", err)
|
||||
return metadata.NewListPublicFrontendsForAccountInternalServerError()
|
||||
}
|
||||
defer trx.Rollback()
|
||||
|
||||
var publicFrontends []*metadata.ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0
|
||||
|
||||
openFes, err := str.FindOpenPublicFrontends(trx)
|
||||
if err != nil {
|
||||
logrus.Errorf("error finding open public frontends: %v", err)
|
||||
return metadata.NewListPublicFrontendsForAccountInternalServerError()
|
||||
}
|
||||
for _, openFe := range openFes {
|
||||
publicFrontends = append(publicFrontends, &metadata.ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0{
|
||||
PublicName: *openFe.PublicName,
|
||||
URLTemplate: *openFe.UrlTemplate,
|
||||
})
|
||||
}
|
||||
|
||||
closedFes, err := str.FindClosedPublicFrontendsGrantedToAccount(int(principal.ID), trx)
|
||||
if err != nil {
|
||||
logrus.Errorf("error finding closed public frontends: %v", err)
|
||||
return metadata.NewListPublicFrontendsForAccountInternalServerError()
|
||||
}
|
||||
for _, closedFe := range closedFes {
|
||||
publicFrontends = append(publicFrontends, &metadata.ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0{
|
||||
PublicName: *closedFe.PublicName,
|
||||
URLTemplate: *closedFe.UrlTemplate,
|
||||
})
|
||||
}
|
||||
|
||||
payload := &metadata.ListPublicFrontendsForAccountOKBody{PublicFrontends: publicFrontends}
|
||||
return metadata.NewListPublicFrontendsForAccountOK().WithPayload(payload)
|
||||
}
|
@ -107,6 +107,46 @@ func (str *Store) FindPublicFrontends(tx *sqlx.Tx) ([]*Frontend, error) {
|
||||
return frontends, nil
|
||||
}
|
||||
|
||||
func (str *Store) FindOpenPublicFrontends(tx *sqlx.Tx) ([]*Frontend, error) {
|
||||
rows, err := tx.Queryx("select frontends.* from frontends where environment_id is null and permission_mode = 'open' and reserved = true and not deleted")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "error selecting open public frontends")
|
||||
}
|
||||
var frontends []*Frontend
|
||||
for rows.Next() {
|
||||
frontend := &Frontend{}
|
||||
if err := rows.StructScan(frontend); err != nil {
|
||||
return nil, errors.Wrap(err, "error scanning frontend")
|
||||
}
|
||||
frontends = append(frontends, frontend)
|
||||
}
|
||||
return frontends, nil
|
||||
}
|
||||
|
||||
func (str *Store) FindClosedPublicFrontendsGrantedToAccount(accountId int, tx *sqlx.Tx) ([]*Frontend, error) {
|
||||
rows, err := tx.Queryx(`
|
||||
select frontends.* from frontends
|
||||
inner join frontend_grants on frontends.id = frontend_grants.frontend_id
|
||||
where frontend_grants.account_id = $1
|
||||
and frontends.environment_id is null
|
||||
and frontends.permission_mode = 'closed'
|
||||
and frontends.reserved = true
|
||||
and not frontends.deleted
|
||||
and not frontend_grants.deleted`, accountId)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "error selecting closed public frontends granted to account")
|
||||
}
|
||||
var frontends []*Frontend
|
||||
for rows.Next() {
|
||||
frontend := &Frontend{}
|
||||
if err := rows.StructScan(frontend); err != nil {
|
||||
return nil, errors.Wrap(err, "error scanning frontend")
|
||||
}
|
||||
frontends = append(frontends, frontend)
|
||||
}
|
||||
return frontends, nil
|
||||
}
|
||||
|
||||
func (str *Store) FindFrontendsForPrivateShare(shrId int, tx *sqlx.Tx) ([]*Frontend, error) {
|
||||
rows, err := tx.Queryx("select frontends.* from frontends where private_share_id = $1 and not deleted", shrId)
|
||||
if err != nil {
|
||||
|
@ -9,7 +9,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
@ -232,20 +234,86 @@ swagger:model ListPublicFrontendsForAccountOKBody
|
||||
*/
|
||||
type ListPublicFrontendsForAccountOKBody struct {
|
||||
|
||||
// public name
|
||||
PublicName string `json:"publicName,omitempty"`
|
||||
|
||||
// url template
|
||||
URLTemplate string `json:"urlTemplate,omitempty"`
|
||||
// public frontends
|
||||
PublicFrontends []*ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0 `json:"publicFrontends"`
|
||||
}
|
||||
|
||||
// Validate validates this list public frontends for account o k body
|
||||
func (o *ListPublicFrontendsForAccountOKBody) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := o.validatePublicFrontends(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this list public frontends for account o k body based on context it is used
|
||||
func (o *ListPublicFrontendsForAccountOKBody) validatePublicFrontends(formats strfmt.Registry) error {
|
||||
if swag.IsZero(o.PublicFrontends) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(o.PublicFrontends); i++ {
|
||||
if swag.IsZero(o.PublicFrontends[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if o.PublicFrontends[i] != nil {
|
||||
if err := o.PublicFrontends[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this list public frontends for account o k body based on the context it is used
|
||||
func (o *ListPublicFrontendsForAccountOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := o.contextValidatePublicFrontends(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *ListPublicFrontendsForAccountOKBody) contextValidatePublicFrontends(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(o.PublicFrontends); i++ {
|
||||
|
||||
if o.PublicFrontends[i] != nil {
|
||||
|
||||
if swag.IsZero(o.PublicFrontends[i]) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := o.PublicFrontends[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -266,3 +334,44 @@ func (o *ListPublicFrontendsForAccountOKBody) UnmarshalBinary(b []byte) error {
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0 list public frontends for account o k body public frontends items0
|
||||
swagger:model ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0
|
||||
*/
|
||||
type ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0 struct {
|
||||
|
||||
// public name
|
||||
PublicName string `json:"publicName,omitempty"`
|
||||
|
||||
// url template
|
||||
URLTemplate string `json:"urlTemplate,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this list public frontends for account o k body public frontends items0
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this list public frontends for account o k body public frontends items0 based on context it is used
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) MarshalBinary() ([]byte, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(o)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) UnmarshalBinary(b []byte) error {
|
||||
var res ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
@ -2083,11 +2083,19 @@ func init() {
|
||||
"description": "public frontends list returned",
|
||||
"schema": {
|
||||
"properties": {
|
||||
"publicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"urlTemplate": {
|
||||
"type": "string"
|
||||
"publicFrontends": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"publicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"urlTemplate": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4977,11 +4985,11 @@ func init() {
|
||||
"description": "public frontends list returned",
|
||||
"schema": {
|
||||
"properties": {
|
||||
"publicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"urlTemplate": {
|
||||
"type": "string"
|
||||
"publicFrontends": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/PublicFrontendsItems0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5612,6 +5620,17 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"PublicFrontendsItems0": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"publicName": {
|
||||
"type": "string"
|
||||
},
|
||||
"urlTemplate": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SharesItems0": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -8,7 +8,9 @@ package metadata
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
@ -78,20 +80,86 @@ func (o *ListPublicFrontendsForAccount) ServeHTTP(rw http.ResponseWriter, r *htt
|
||||
// swagger:model ListPublicFrontendsForAccountOKBody
|
||||
type ListPublicFrontendsForAccountOKBody struct {
|
||||
|
||||
// public name
|
||||
PublicName string `json:"publicName,omitempty"`
|
||||
|
||||
// url template
|
||||
URLTemplate string `json:"urlTemplate,omitempty"`
|
||||
// public frontends
|
||||
PublicFrontends []*ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0 `json:"publicFrontends"`
|
||||
}
|
||||
|
||||
// Validate validates this list public frontends for account o k body
|
||||
func (o *ListPublicFrontendsForAccountOKBody) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := o.validatePublicFrontends(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this list public frontends for account o k body based on context it is used
|
||||
func (o *ListPublicFrontendsForAccountOKBody) validatePublicFrontends(formats strfmt.Registry) error {
|
||||
if swag.IsZero(o.PublicFrontends) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(o.PublicFrontends); i++ {
|
||||
if swag.IsZero(o.PublicFrontends[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if o.PublicFrontends[i] != nil {
|
||||
if err := o.PublicFrontends[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this list public frontends for account o k body based on the context it is used
|
||||
func (o *ListPublicFrontendsForAccountOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := o.contextValidatePublicFrontends(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (o *ListPublicFrontendsForAccountOKBody) contextValidatePublicFrontends(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(o.PublicFrontends); i++ {
|
||||
|
||||
if o.PublicFrontends[i] != nil {
|
||||
|
||||
if swag.IsZero(o.PublicFrontends[i]) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := o.PublicFrontends[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("listPublicFrontendsForAccountOK" + "." + "publicFrontends" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -112,3 +180,43 @@ func (o *ListPublicFrontendsForAccountOKBody) UnmarshalBinary(b []byte) error {
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
||||
// ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0 list public frontends for account o k body public frontends items0
|
||||
//
|
||||
// swagger:model ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0
|
||||
type ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0 struct {
|
||||
|
||||
// public name
|
||||
PublicName string `json:"publicName,omitempty"`
|
||||
|
||||
// url template
|
||||
URLTemplate string `json:"urlTemplate,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this list public frontends for account o k body public frontends items0
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this list public frontends for account o k body public frontends items0 based on context it is used
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) MarshalBinary() ([]byte, error) {
|
||||
if o == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(o)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (o *ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0) UnmarshalBinary(b []byte) error {
|
||||
var res ListPublicFrontendsForAccountOKBodyPublicFrontendsItems0
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = res
|
||||
return nil
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ models/ListOrganizationMembers200ResponseMembersInner.ts
|
||||
models/ListOrganizations200Response.ts
|
||||
models/ListOrganizations200ResponseOrganizationsInner.ts
|
||||
models/ListPublicFrontendsForAccount200Response.ts
|
||||
models/ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.ts
|
||||
models/LoginRequest.ts
|
||||
models/Metrics.ts
|
||||
models/MetricsSample.ts
|
||||
|
@ -13,6 +13,14 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ListPublicFrontendsForAccount200ResponsePublicFrontendsInner } from './ListPublicFrontendsForAccount200ResponsePublicFrontendsInner';
|
||||
import {
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSON,
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSONTyped,
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSON,
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSONTyped,
|
||||
} from './ListPublicFrontendsForAccount200ResponsePublicFrontendsInner';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -21,16 +29,10 @@ import { mapValues } from '../runtime';
|
||||
export interface ListPublicFrontendsForAccount200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @type {Array<ListPublicFrontendsForAccount200ResponsePublicFrontendsInner>}
|
||||
* @memberof ListPublicFrontendsForAccount200Response
|
||||
*/
|
||||
publicName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListPublicFrontendsForAccount200Response
|
||||
*/
|
||||
urlTemplate?: string;
|
||||
publicFrontends?: Array<ListPublicFrontendsForAccount200ResponsePublicFrontendsInner>;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,8 +52,7 @@ export function ListPublicFrontendsForAccount200ResponseFromJSONTyped(json: any,
|
||||
}
|
||||
return {
|
||||
|
||||
'publicName': json['publicName'] == null ? undefined : json['publicName'],
|
||||
'urlTemplate': json['urlTemplate'] == null ? undefined : json['urlTemplate'],
|
||||
'publicFrontends': json['publicFrontends'] == null ? undefined : ((json['publicFrontends'] as Array<any>).map(ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@ -66,8 +67,7 @@ export function ListPublicFrontendsForAccount200ResponseToJSONTyped(value?: List
|
||||
|
||||
return {
|
||||
|
||||
'publicName': value['publicName'],
|
||||
'urlTemplate': value['urlTemplate'],
|
||||
'publicFrontends': value['publicFrontends'] == null ? undefined : ((value['publicFrontends'] as Array<any>).map(ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
*/
|
||||
export interface ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
*/
|
||||
publicName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
*/
|
||||
urlTemplate?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListPublicFrontendsForAccount200ResponsePublicFrontendsInner interface.
|
||||
*/
|
||||
export function instanceOfListPublicFrontendsForAccount200ResponsePublicFrontendsInner(value: object): value is ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSON(json: any): ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
return ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'publicName': json['publicName'] == null ? undefined : json['publicName'],
|
||||
'urlTemplate': json['urlTemplate'] == null ? undefined : json['urlTemplate'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSON(json: any): ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
return ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSONTyped(value?: ListPublicFrontendsForAccount200ResponsePublicFrontendsInner | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'publicName': value['publicName'],
|
||||
'urlTemplate': value['urlTemplate'],
|
||||
};
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ export * from './ListOrganizationMembers200ResponseMembersInner';
|
||||
export * from './ListOrganizations200Response';
|
||||
export * from './ListOrganizations200ResponseOrganizationsInner';
|
||||
export * from './ListPublicFrontendsForAccount200Response';
|
||||
export * from './ListPublicFrontendsForAccount200ResponsePublicFrontendsInner';
|
||||
export * from './LoginRequest';
|
||||
export * from './Metrics';
|
||||
export * from './MetricsSample';
|
||||
|
@ -37,6 +37,7 @@ docs/ListOrganizationMembers200ResponseMembersInner.md
|
||||
docs/ListOrganizations200Response.md
|
||||
docs/ListOrganizations200ResponseOrganizationsInner.md
|
||||
docs/ListPublicFrontendsForAccount200Response.md
|
||||
docs/ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.md
|
||||
docs/LoginRequest.md
|
||||
docs/MetadataApi.md
|
||||
docs/Metrics.md
|
||||
@ -110,6 +111,7 @@ test/test_list_organization_members200_response_members_inner.py
|
||||
test/test_list_organizations200_response.py
|
||||
test/test_list_organizations200_response_organizations_inner.py
|
||||
test/test_list_public_frontends_for_account200_response.py
|
||||
test/test_list_public_frontends_for_account200_response_public_frontends_inner.py
|
||||
test/test_login_request.py
|
||||
test/test_metadata_api.py
|
||||
test/test_metrics.py
|
||||
@ -189,6 +191,7 @@ zrok_api/models/list_organization_members200_response_members_inner.py
|
||||
zrok_api/models/list_organizations200_response.py
|
||||
zrok_api/models/list_organizations200_response_organizations_inner.py
|
||||
zrok_api/models/list_public_frontends_for_account200_response.py
|
||||
zrok_api/models/list_public_frontends_for_account200_response_public_frontends_inner.py
|
||||
zrok_api/models/login_request.py
|
||||
zrok_api/models/metrics.py
|
||||
zrok_api/models/metrics_sample.py
|
||||
|
@ -187,6 +187,7 @@ Class | Method | HTTP request | Description
|
||||
- [ListOrganizations200Response](docs/ListOrganizations200Response.md)
|
||||
- [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md)
|
||||
- [ListPublicFrontendsForAccount200Response](docs/ListPublicFrontendsForAccount200Response.md)
|
||||
- [ListPublicFrontendsForAccount200ResponsePublicFrontendsInner](docs/ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.md)
|
||||
- [LoginRequest](docs/LoginRequest.md)
|
||||
- [Metrics](docs/Metrics.md)
|
||||
- [MetricsSample](docs/MetricsSample.md)
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**public_name** | **str** | | [optional]
|
||||
**url_template** | **str** | | [optional]
|
||||
**public_frontends** | [**List[ListPublicFrontendsForAccount200ResponsePublicFrontendsInner]**](ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
# ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**public_name** | **str** | | [optional]
|
||||
**url_template** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from zrok_api.models.list_public_frontends_for_account200_response_public_frontends_inner import ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of ListPublicFrontendsForAccount200ResponsePublicFrontendsInner from a JSON string
|
||||
list_public_frontends_for_account200_response_public_frontends_inner_instance = ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print(ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.to_json())
|
||||
|
||||
# convert the object into a dict
|
||||
list_public_frontends_for_account200_response_public_frontends_inner_dict = list_public_frontends_for_account200_response_public_frontends_inner_instance.to_dict()
|
||||
# create an instance of ListPublicFrontendsForAccount200ResponsePublicFrontendsInner from a dict
|
||||
list_public_frontends_for_account200_response_public_frontends_inner_from_dict = ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.from_dict(list_public_frontends_for_account200_response_public_frontends_inner_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -35,8 +35,11 @@ class TestListPublicFrontendsForAccount200Response(unittest.TestCase):
|
||||
model = ListPublicFrontendsForAccount200Response()
|
||||
if include_optional:
|
||||
return ListPublicFrontendsForAccount200Response(
|
||||
public_name = '',
|
||||
url_template = ''
|
||||
public_frontends = [
|
||||
zrok_api.models.list_public_frontends_for_account_200_response_public_frontends_inner.listPublicFrontendsForAccount_200_response_publicFrontends_inner(
|
||||
public_name = '',
|
||||
url_template = '', )
|
||||
]
|
||||
)
|
||||
else:
|
||||
return ListPublicFrontendsForAccount200Response(
|
||||
|
@ -0,0 +1,52 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
from zrok_api.models.list_public_frontends_for_account200_response_public_frontends_inner import ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
|
||||
class TestListPublicFrontendsForAccount200ResponsePublicFrontendsInner(unittest.TestCase):
|
||||
"""ListPublicFrontendsForAccount200ResponsePublicFrontendsInner unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def make_instance(self, include_optional) -> ListPublicFrontendsForAccount200ResponsePublicFrontendsInner:
|
||||
"""Test ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
include_optional is a boolean, when False only required
|
||||
params are included, when True both required and
|
||||
optional params are included """
|
||||
# uncomment below to create an instance of `ListPublicFrontendsForAccount200ResponsePublicFrontendsInner`
|
||||
"""
|
||||
model = ListPublicFrontendsForAccount200ResponsePublicFrontendsInner()
|
||||
if include_optional:
|
||||
return ListPublicFrontendsForAccount200ResponsePublicFrontendsInner(
|
||||
public_name = '',
|
||||
url_template = ''
|
||||
)
|
||||
else:
|
||||
return ListPublicFrontendsForAccount200ResponsePublicFrontendsInner(
|
||||
)
|
||||
"""
|
||||
|
||||
def testListPublicFrontendsForAccount200ResponsePublicFrontendsInner(self):
|
||||
"""Test ListPublicFrontendsForAccount200ResponsePublicFrontendsInner"""
|
||||
# inst_req_only = self.make_instance(include_optional=False)
|
||||
# inst_req_and_optional = self.make_instance(include_optional=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
@ -69,6 +69,7 @@ from zrok_api.models.list_organization_members200_response_members_inner import
|
||||
from zrok_api.models.list_organizations200_response import ListOrganizations200Response
|
||||
from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
|
||||
from zrok_api.models.list_public_frontends_for_account200_response import ListPublicFrontendsForAccount200Response
|
||||
from zrok_api.models.list_public_frontends_for_account200_response_public_frontends_inner import ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
from zrok_api.models.login_request import LoginRequest
|
||||
from zrok_api.models.metrics import Metrics
|
||||
from zrok_api.models.metrics_sample import MetricsSample
|
||||
|
@ -47,6 +47,7 @@ from zrok_api.models.list_organization_members200_response_members_inner import
|
||||
from zrok_api.models.list_organizations200_response import ListOrganizations200Response
|
||||
from zrok_api.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
|
||||
from zrok_api.models.list_public_frontends_for_account200_response import ListPublicFrontendsForAccount200Response
|
||||
from zrok_api.models.list_public_frontends_for_account200_response_public_frontends_inner import ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
from zrok_api.models.login_request import LoginRequest
|
||||
from zrok_api.models.metrics import Metrics
|
||||
from zrok_api.models.metrics_sample import MetricsSample
|
||||
|
@ -17,8 +17,9 @@ import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from zrok_api.models.list_public_frontends_for_account200_response_public_frontends_inner import ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
@ -26,9 +27,8 @@ class ListPublicFrontendsForAccount200Response(BaseModel):
|
||||
"""
|
||||
ListPublicFrontendsForAccount200Response
|
||||
""" # noqa: E501
|
||||
public_name: Optional[StrictStr] = Field(default=None, alias="publicName")
|
||||
url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate")
|
||||
__properties: ClassVar[List[str]] = ["publicName", "urlTemplate"]
|
||||
public_frontends: Optional[List[ListPublicFrontendsForAccount200ResponsePublicFrontendsInner]] = Field(default=None, alias="publicFrontends")
|
||||
__properties: ClassVar[List[str]] = ["publicFrontends"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@ -69,6 +69,13 @@ class ListPublicFrontendsForAccount200Response(BaseModel):
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
# override the default output from pydantic by calling `to_dict()` of each item in public_frontends (list)
|
||||
_items = []
|
||||
if self.public_frontends:
|
||||
for _item_public_frontends in self.public_frontends:
|
||||
if _item_public_frontends:
|
||||
_items.append(_item_public_frontends.to_dict())
|
||||
_dict['publicFrontends'] = _items
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
@ -81,8 +88,7 @@ class ListPublicFrontendsForAccount200Response(BaseModel):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"publicName": obj.get("publicName"),
|
||||
"urlTemplate": obj.get("urlTemplate")
|
||||
"publicFrontends": [ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.from_dict(_item) for _item in obj["publicFrontends"]] if obj.get("publicFrontends") is not None else None
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
@ -0,0 +1,89 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
zrok
|
||||
|
||||
zrok client access
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
""" # noqa: E501
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
import pprint
|
||||
import re # noqa: F401
|
||||
import json
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
||||
from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
|
||||
class ListPublicFrontendsForAccount200ResponsePublicFrontendsInner(BaseModel):
|
||||
"""
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
""" # noqa: E501
|
||||
public_name: Optional[StrictStr] = Field(default=None, alias="publicName")
|
||||
url_template: Optional[StrictStr] = Field(default=None, alias="urlTemplate")
|
||||
__properties: ClassVar[List[str]] = ["publicName", "urlTemplate"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
validate_assignment=True,
|
||||
protected_namespaces=(),
|
||||
)
|
||||
|
||||
|
||||
def to_str(self) -> str:
|
||||
"""Returns the string representation of the model using alias"""
|
||||
return pprint.pformat(self.model_dump(by_alias=True))
|
||||
|
||||
def to_json(self) -> str:
|
||||
"""Returns the JSON representation of the model using alias"""
|
||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
||||
return json.dumps(self.to_dict())
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
||||
"""Create an instance of ListPublicFrontendsForAccount200ResponsePublicFrontendsInner from a JSON string"""
|
||||
return cls.from_dict(json.loads(json_str))
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
"""Return the dictionary representation of the model using alias.
|
||||
|
||||
This has the following differences from calling pydantic's
|
||||
`self.model_dump(by_alias=True)`:
|
||||
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
by_alias=True,
|
||||
exclude=excluded_fields,
|
||||
exclude_none=True,
|
||||
)
|
||||
return _dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||
"""Create an instance of ListPublicFrontendsForAccount200ResponsePublicFrontendsInner from a dict"""
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
if not isinstance(obj, dict):
|
||||
return cls.model_validate(obj)
|
||||
|
||||
_obj = cls.model_validate({
|
||||
"publicName": obj.get("publicName"),
|
||||
"urlTemplate": obj.get("urlTemplate")
|
||||
})
|
||||
return _obj
|
||||
|
||||
|
@ -1266,10 +1266,15 @@ paths:
|
||||
description: public frontends list returned
|
||||
schema:
|
||||
properties:
|
||||
publicName:
|
||||
type: string
|
||||
urlTemplate:
|
||||
type: string
|
||||
publicFrontends:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
publicName:
|
||||
type: string
|
||||
urlTemplate:
|
||||
type: string
|
||||
401:
|
||||
description: unauthorized
|
||||
500:
|
||||
|
@ -39,6 +39,7 @@ models/ListOrganizationMembers200ResponseMembersInner.ts
|
||||
models/ListOrganizations200Response.ts
|
||||
models/ListOrganizations200ResponseOrganizationsInner.ts
|
||||
models/ListPublicFrontendsForAccount200Response.ts
|
||||
models/ListPublicFrontendsForAccount200ResponsePublicFrontendsInner.ts
|
||||
models/LoginRequest.ts
|
||||
models/Metrics.ts
|
||||
models/MetricsSample.ts
|
||||
|
@ -13,6 +13,14 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ListPublicFrontendsForAccount200ResponsePublicFrontendsInner } from './ListPublicFrontendsForAccount200ResponsePublicFrontendsInner';
|
||||
import {
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSON,
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSONTyped,
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSON,
|
||||
ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSONTyped,
|
||||
} from './ListPublicFrontendsForAccount200ResponsePublicFrontendsInner';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -21,16 +29,10 @@ import { mapValues } from '../runtime';
|
||||
export interface ListPublicFrontendsForAccount200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @type {Array<ListPublicFrontendsForAccount200ResponsePublicFrontendsInner>}
|
||||
* @memberof ListPublicFrontendsForAccount200Response
|
||||
*/
|
||||
publicName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListPublicFrontendsForAccount200Response
|
||||
*/
|
||||
urlTemplate?: string;
|
||||
publicFrontends?: Array<ListPublicFrontendsForAccount200ResponsePublicFrontendsInner>;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,8 +52,7 @@ export function ListPublicFrontendsForAccount200ResponseFromJSONTyped(json: any,
|
||||
}
|
||||
return {
|
||||
|
||||
'publicName': json['publicName'] == null ? undefined : json['publicName'],
|
||||
'urlTemplate': json['urlTemplate'] == null ? undefined : json['urlTemplate'],
|
||||
'publicFrontends': json['publicFrontends'] == null ? undefined : ((json['publicFrontends'] as Array<any>).map(ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@ -66,8 +67,7 @@ export function ListPublicFrontendsForAccount200ResponseToJSONTyped(value?: List
|
||||
|
||||
return {
|
||||
|
||||
'publicName': value['publicName'],
|
||||
'urlTemplate': value['urlTemplate'],
|
||||
'publicFrontends': value['publicFrontends'] == null ? undefined : ((value['publicFrontends'] as Array<any>).map(ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* zrok
|
||||
* zrok client access
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
*/
|
||||
export interface ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
*/
|
||||
publicName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ListPublicFrontendsForAccount200ResponsePublicFrontendsInner
|
||||
*/
|
||||
urlTemplate?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ListPublicFrontendsForAccount200ResponsePublicFrontendsInner interface.
|
||||
*/
|
||||
export function instanceOfListPublicFrontendsForAccount200ResponsePublicFrontendsInner(value: object): value is ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSON(json: any): ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
return ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'publicName': json['publicName'] == null ? undefined : json['publicName'],
|
||||
'urlTemplate': json['urlTemplate'] == null ? undefined : json['urlTemplate'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSON(json: any): ListPublicFrontendsForAccount200ResponsePublicFrontendsInner {
|
||||
return ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ListPublicFrontendsForAccount200ResponsePublicFrontendsInnerToJSONTyped(value?: ListPublicFrontendsForAccount200ResponsePublicFrontendsInner | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'publicName': value['publicName'],
|
||||
'urlTemplate': value['urlTemplate'],
|
||||
};
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ export * from './ListOrganizationMembers200ResponseMembersInner';
|
||||
export * from './ListOrganizations200Response';
|
||||
export * from './ListOrganizations200ResponseOrganizationsInner';
|
||||
export * from './ListPublicFrontendsForAccount200Response';
|
||||
export * from './ListPublicFrontendsForAccount200ResponsePublicFrontendsInner';
|
||||
export * from './LoginRequest';
|
||||
export * from './Metrics';
|
||||
export * from './MetricsSample';
|
||||
|
Loading…
x
Reference in New Issue
Block a user