/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
vendor/github.com/microsoftgraph/msgraph-sdk-go/models/contract.go
193 строки
8 KB
Justin Pierce
Add compat_otp package with openshift-tests-private (OTP) util implementations
11 авг 2025, 18:00
11 авг 2025, 18:00
80ac5c1
Код
Авторство
О чём код?
// Code generated by Microsoft Kiota - DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. package models import ( i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" ) type Contract struct { DirectoryObject } // NewContract instantiates a new Contract and sets the default values. func NewContract()(*Contract) { m := &Contract{ DirectoryObject: *NewDirectoryObject(), } odataTypeValue := "#microsoft.graph.contract" m.SetOdataType(&odataTypeValue) return m } // CreateContractFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value // returns a Parsable when successful func CreateContractFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { return NewContract(), nil } // GetContractType gets the contractType property value. Type of contract. Possible values are: SyndicationPartner, BreadthPartner, ResellerPartner. See more in the table below. // returns a *string when successful func (m *Contract) GetContractType()(*string) { val, err := m.GetBackingStore().Get("contractType") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetCustomerId gets the customerId property value. The unique identifier for the customer tenant referenced by this partnership. Corresponds to the id property of the customer tenant's organization resource. // returns a *UUID when successful func (m *Contract) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { val, err := m.GetBackingStore().Get("customerId") if err != nil { panic(err) } if val != nil { return val.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) } return nil } // GetDefaultDomainName gets the defaultDomainName property value. A copy of the customer tenant's default domain name. The copy is made when the partnership with the customer is established. It isn't automatically updated if the customer tenant's default domain name changes. // returns a *string when successful func (m *Contract) GetDefaultDomainName()(*string) { val, err := m.GetBackingStore().Get("defaultDomainName") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetDisplayName gets the displayName property value. A copy of the customer tenant's display name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant's display name changes. // returns a *string when successful func (m *Contract) GetDisplayName()(*string) { val, err := m.GetBackingStore().Get("displayName") if err != nil { panic(err) } if val != nil { return val.(*string) } return nil } // GetFieldDeserializers the deserialization information for the current model // returns a map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error) when successful func (m *Contract) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { res := m.DirectoryObject.GetFieldDeserializers() res["contractType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetContractType(val) } return nil } res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetUUIDValue() if err != nil { return err } if val != nil { m.SetCustomerId(val) } return nil } res["defaultDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetDefaultDomainName(val) } return nil } res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { val, err := n.GetStringValue() if err != nil { return err } if val != nil { m.SetDisplayName(val) } return nil } return res } // Serialize serializes information the current object func (m *Contract) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { err := m.DirectoryObject.Serialize(writer) if err != nil { return err } { err = writer.WriteStringValue("contractType", m.GetContractType()) if err != nil { return err } } { err = writer.WriteUUIDValue("customerId", m.GetCustomerId()) if err != nil { return err } } { err = writer.WriteStringValue("defaultDomainName", m.GetDefaultDomainName()) if err != nil { return err } } { err = writer.WriteStringValue("displayName", m.GetDisplayName()) if err != nil { return err } } return nil } // SetContractType sets the contractType property value. Type of contract. Possible values are: SyndicationPartner, BreadthPartner, ResellerPartner. See more in the table below. func (m *Contract) SetContractType(value *string)() { err := m.GetBackingStore().Set("contractType", value) if err != nil { panic(err) } } // SetCustomerId sets the customerId property value. The unique identifier for the customer tenant referenced by this partnership. Corresponds to the id property of the customer tenant's organization resource. func (m *Contract) SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { err := m.GetBackingStore().Set("customerId", value) if err != nil { panic(err) } } // SetDefaultDomainName sets the defaultDomainName property value. A copy of the customer tenant's default domain name. The copy is made when the partnership with the customer is established. It isn't automatically updated if the customer tenant's default domain name changes. func (m *Contract) SetDefaultDomainName(value *string)() { err := m.GetBackingStore().Set("defaultDomainName", value) if err != nil { panic(err) } } // SetDisplayName sets the displayName property value. A copy of the customer tenant's display name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant's display name changes. func (m *Contract) SetDisplayName(value *string)() { err := m.GetBackingStore().Set("displayName", value) if err != nil { panic(err) } } type Contractable interface { DirectoryObjectable i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable GetContractType()(*string) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) GetDefaultDomainName()(*string) GetDisplayName()(*string) SetContractType(value *string)() SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() SetDefaultDomainName(value *string)() SetDisplayName(value *string)() }