github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/internal/graph/generated.go (about)

     1  // Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
     2  
     3  package graph
     4  
     5  import (
     6  	"fmt"
     7  	"io"
     8  	"strconv"
     9  )
    10  
    11  type AnalyticsEventResponse struct {
    12  	Sent bool `json:"sent"`
    13  }
    14  
    15  type AvailableUpdate struct {
    16  	Version  string `json:"version"`
    17  	Channel  string `json:"channel"`
    18  	Path     string `json:"path"`
    19  	Platform string `json:"platform"`
    20  	Sha256   string `json:"sha256"`
    21  }
    22  
    23  type ConfigChangedResponse struct {
    24  	Received bool `json:"received"`
    25  }
    26  
    27  type MessageInfo struct {
    28  	ID        string               `json:"id"`
    29  	Message   string               `json:"message"`
    30  	Condition string               `json:"condition"`
    31  	Repeat    MessageRepeatType    `json:"repeat"`
    32  	Interrupt MessageInterruptType `json:"interrupt"`
    33  	Placement MessagePlacementType `json:"placement"`
    34  }
    35  
    36  type ProcessInfo struct {
    37  	Exe string `json:"exe"`
    38  	Pid int    `json:"pid"`
    39  }
    40  
    41  type Project struct {
    42  	Namespace string   `json:"namespace"`
    43  	Locations []string `json:"locations"`
    44  }
    45  
    46  type ReportRuntimeUsageResponse struct {
    47  	Received bool `json:"received"`
    48  }
    49  
    50  type StateVersion struct {
    51  	License  string `json:"license"`
    52  	Version  string `json:"version"`
    53  	Channel  string `json:"channel"`
    54  	Revision string `json:"revision"`
    55  	Date     string `json:"date"`
    56  }
    57  
    58  type Version struct {
    59  	State *StateVersion `json:"state"`
    60  }
    61  
    62  type MessageInterruptType string
    63  
    64  const (
    65  	MessageInterruptTypeDisabled MessageInterruptType = "Disabled"
    66  	MessageInterruptTypePrompt   MessageInterruptType = "Prompt"
    67  	MessageInterruptTypeExit     MessageInterruptType = "Exit"
    68  )
    69  
    70  var AllMessageInterruptType = []MessageInterruptType{
    71  	MessageInterruptTypeDisabled,
    72  	MessageInterruptTypePrompt,
    73  	MessageInterruptTypeExit,
    74  }
    75  
    76  func (e MessageInterruptType) IsValid() bool {
    77  	switch e {
    78  	case MessageInterruptTypeDisabled, MessageInterruptTypePrompt, MessageInterruptTypeExit:
    79  		return true
    80  	}
    81  	return false
    82  }
    83  
    84  func (e MessageInterruptType) String() string {
    85  	return string(e)
    86  }
    87  
    88  func (e *MessageInterruptType) UnmarshalGQL(v interface{}) error {
    89  	str, ok := v.(string)
    90  	if !ok {
    91  		return fmt.Errorf("enums must be strings")
    92  	}
    93  
    94  	*e = MessageInterruptType(str)
    95  	if !e.IsValid() {
    96  		return fmt.Errorf("%s is not a valid MessageInterruptType", str)
    97  	}
    98  	return nil
    99  }
   100  
   101  func (e MessageInterruptType) MarshalGQL(w io.Writer) {
   102  	fmt.Fprint(w, strconv.Quote(e.String()))
   103  }
   104  
   105  type MessagePlacementType string
   106  
   107  const (
   108  	MessagePlacementTypeBeforeCmd MessagePlacementType = "BeforeCmd"
   109  	MessagePlacementTypeAfterCmd  MessagePlacementType = "AfterCmd"
   110  )
   111  
   112  var AllMessagePlacementType = []MessagePlacementType{
   113  	MessagePlacementTypeBeforeCmd,
   114  	MessagePlacementTypeAfterCmd,
   115  }
   116  
   117  func (e MessagePlacementType) IsValid() bool {
   118  	switch e {
   119  	case MessagePlacementTypeBeforeCmd, MessagePlacementTypeAfterCmd:
   120  		return true
   121  	}
   122  	return false
   123  }
   124  
   125  func (e MessagePlacementType) String() string {
   126  	return string(e)
   127  }
   128  
   129  func (e *MessagePlacementType) UnmarshalGQL(v interface{}) error {
   130  	str, ok := v.(string)
   131  	if !ok {
   132  		return fmt.Errorf("enums must be strings")
   133  	}
   134  
   135  	*e = MessagePlacementType(str)
   136  	if !e.IsValid() {
   137  		return fmt.Errorf("%s is not a valid MessagePlacementType", str)
   138  	}
   139  	return nil
   140  }
   141  
   142  func (e MessagePlacementType) MarshalGQL(w io.Writer) {
   143  	fmt.Fprint(w, strconv.Quote(e.String()))
   144  }
   145  
   146  type MessageRepeatType string
   147  
   148  const (
   149  	MessageRepeatTypeDisabled   MessageRepeatType = "Disabled"
   150  	MessageRepeatTypeConstantly MessageRepeatType = "Constantly"
   151  	MessageRepeatTypeHourly     MessageRepeatType = "Hourly"
   152  	MessageRepeatTypeDaily      MessageRepeatType = "Daily"
   153  	MessageRepeatTypeWeekly     MessageRepeatType = "Weekly"
   154  	MessageRepeatTypeMonthly    MessageRepeatType = "Monthly"
   155  )
   156  
   157  var AllMessageRepeatType = []MessageRepeatType{
   158  	MessageRepeatTypeDisabled,
   159  	MessageRepeatTypeConstantly,
   160  	MessageRepeatTypeHourly,
   161  	MessageRepeatTypeDaily,
   162  	MessageRepeatTypeWeekly,
   163  	MessageRepeatTypeMonthly,
   164  }
   165  
   166  func (e MessageRepeatType) IsValid() bool {
   167  	switch e {
   168  	case MessageRepeatTypeDisabled, MessageRepeatTypeConstantly, MessageRepeatTypeHourly, MessageRepeatTypeDaily, MessageRepeatTypeWeekly, MessageRepeatTypeMonthly:
   169  		return true
   170  	}
   171  	return false
   172  }
   173  
   174  func (e MessageRepeatType) String() string {
   175  	return string(e)
   176  }
   177  
   178  func (e *MessageRepeatType) UnmarshalGQL(v interface{}) error {
   179  	str, ok := v.(string)
   180  	if !ok {
   181  		return fmt.Errorf("enums must be strings")
   182  	}
   183  
   184  	*e = MessageRepeatType(str)
   185  	if !e.IsValid() {
   186  		return fmt.Errorf("%s is not a valid MessageRepeatType", str)
   187  	}
   188  	return nil
   189  }
   190  
   191  func (e MessageRepeatType) MarshalGQL(w io.Writer) {
   192  	fmt.Fprint(w, strconv.Quote(e.String()))
   193  }