@@ -240,6 +240,48 @@ func (g *GitHubConfig) String() string {
240240 return fmt .Sprintf ("%#v" , g )
241241}
242242
243+ type CargoPublishInfo struct {
244+ PackageName string `json:"packageName" url:"packageName"`
245+ Version string `json:"version" url:"version"`
246+
247+ extraProperties map [string ]interface {}
248+ _rawJSON json.RawMessage
249+ }
250+
251+ func (c * CargoPublishInfo ) GetExtraProperties () map [string ]interface {} {
252+ return c .extraProperties
253+ }
254+
255+ func (c * CargoPublishInfo ) UnmarshalJSON (data []byte ) error {
256+ type unmarshaler CargoPublishInfo
257+ var value unmarshaler
258+ if err := json .Unmarshal (data , & value ); err != nil {
259+ return err
260+ }
261+ * c = CargoPublishInfo (value )
262+
263+ extraProperties , err := core .ExtractExtraProperties (data , * c )
264+ if err != nil {
265+ return err
266+ }
267+ c .extraProperties = extraProperties
268+
269+ c ._rawJSON = json .RawMessage (data )
270+ return nil
271+ }
272+
273+ func (c * CargoPublishInfo ) String () string {
274+ if len (c ._rawJSON ) > 0 {
275+ if value , err := core .StringifyJSON (c ._rawJSON ); err == nil {
276+ return value
277+ }
278+ }
279+ if value , err := core .StringifyJSON (c ); err == nil {
280+ return value
281+ }
282+ return fmt .Sprintf ("%#v" , c )
283+ }
284+
243285type ComposerPublishInfo struct {
244286 PackageName string `json:"packageName" url:"packageName"`
245287
@@ -503,6 +545,7 @@ type LanguageInfo struct {
503545 Ruby * RubyInfo
504546 Csharp * CsharpInfo
505547 Php * PhpInfo
548+ Rust * RustInfo
506549}
507550
508551func (l * LanguageInfo ) UnmarshalJSON (data []byte ) error {
@@ -556,6 +599,12 @@ func (l *LanguageInfo) UnmarshalJSON(data []byte) error {
556599 return err
557600 }
558601 l .Php = value
602+ case "rust" :
603+ value := new (RustInfo )
604+ if err := json .Unmarshal (data , & value ); err != nil {
605+ return err
606+ }
607+ l .Rust = value
559608 }
560609 return nil
561610}
@@ -582,6 +631,9 @@ func (l LanguageInfo) MarshalJSON() ([]byte, error) {
582631 if l .Php != nil {
583632 return core .MarshalJSONWithExtraProperty (l .Php , "type" , "php" )
584633 }
634+ if l .Rust != nil {
635+ return core .MarshalJSONWithExtraProperty (l .Rust , "type" , "rust" )
636+ }
585637 return nil , fmt .Errorf ("type %T does not define a non-empty union type" , l )
586638}
587639
@@ -593,6 +645,7 @@ type LanguageInfoVisitor interface {
593645 VisitRuby (* RubyInfo ) error
594646 VisitCsharp (* CsharpInfo ) error
595647 VisitPhp (* PhpInfo ) error
648+ VisitRust (* RustInfo ) error
596649}
597650
598651func (l * LanguageInfo ) Accept (visitor LanguageInfoVisitor ) error {
@@ -617,6 +670,9 @@ func (l *LanguageInfo) Accept(visitor LanguageInfoVisitor) error {
617670 if l .Php != nil {
618671 return visitor .VisitPhp (l .Php )
619672 }
673+ if l .Rust != nil {
674+ return visitor .VisitRust (l .Rust )
675+ }
620676 return fmt .Errorf ("type %T does not define a non-empty union type" , l )
621677}
622678
@@ -1099,6 +1155,47 @@ func (r *RubyInfo) String() string {
10991155 return fmt .Sprintf ("%#v" , r )
11001156}
11011157
1158+ type RustInfo struct {
1159+ PublishInfo * CargoPublishInfo `json:"publishInfo,omitempty" url:"publishInfo,omitempty"`
1160+
1161+ extraProperties map [string ]interface {}
1162+ _rawJSON json.RawMessage
1163+ }
1164+
1165+ func (r * RustInfo ) GetExtraProperties () map [string ]interface {} {
1166+ return r .extraProperties
1167+ }
1168+
1169+ func (r * RustInfo ) UnmarshalJSON (data []byte ) error {
1170+ type unmarshaler RustInfo
1171+ var value unmarshaler
1172+ if err := json .Unmarshal (data , & value ); err != nil {
1173+ return err
1174+ }
1175+ * r = RustInfo (value )
1176+
1177+ extraProperties , err := core .ExtractExtraProperties (data , * r )
1178+ if err != nil {
1179+ return err
1180+ }
1181+ r .extraProperties = extraProperties
1182+
1183+ r ._rawJSON = json .RawMessage (data )
1184+ return nil
1185+ }
1186+
1187+ func (r * RustInfo ) String () string {
1188+ if len (r ._rawJSON ) > 0 {
1189+ if value , err := core .StringifyJSON (r ._rawJSON ); err == nil {
1190+ return value
1191+ }
1192+ }
1193+ if value , err := core .StringifyJSON (r ); err == nil {
1194+ return value
1195+ }
1196+ return fmt .Sprintf ("%#v" , r )
1197+ }
1198+
11021199type TypescriptInfo struct {
11031200 PublishInfo * NpmPublishInfo `json:"publishInfo,omitempty" url:"publishInfo,omitempty"`
11041201
@@ -1204,6 +1301,7 @@ const (
12041301 LanguageCsharp Language = "CSHARP"
12051302 LanguageTypescript Language = "TYPESCRIPT"
12061303 LanguagePhp Language = "PHP"
1304+ LanguageRust Language = "RUST"
12071305)
12081306
12091307func NewLanguageFromString (s string ) (Language , error ) {
@@ -1222,6 +1320,8 @@ func NewLanguageFromString(s string) (Language, error) {
12221320 return LanguageTypescript , nil
12231321 case "PHP" :
12241322 return LanguagePhp , nil
1323+ case "RUST" :
1324+ return LanguageRust , nil
12251325 }
12261326 var t Language
12271327 return "" , fmt .Errorf ("%s is not a valid %T" , s , t )
0 commit comments