From 9fd4d3e2fb6517b20b552115fe4274734bdb3ade Mon Sep 17 00:00:00 2001 From: Ashish Mathew Date: Mon, 15 Apr 2024 09:59:22 -0700 Subject: [PATCH] ipam: add echo_client_id to dhcp_config (#29) --- ipam/docs/IpamsvcDHCPConfig.md | 26 +++++++++++++ ipam/docs/IpamsvcInheritedDHCPConfig.md | 26 +++++++++++++ ipam/model_ipamsvc_dhcp_config.go | 41 +++++++++++++++++++++ ipam/model_ipamsvc_inherited_dhcp_config.go | 36 ++++++++++++++++++ 4 files changed, 129 insertions(+) diff --git a/ipam/docs/IpamsvcDHCPConfig.md b/ipam/docs/IpamsvcDHCPConfig.md index bd959d5..be68c85 100644 --- a/ipam/docs/IpamsvcDHCPConfig.md +++ b/ipam/docs/IpamsvcDHCPConfig.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **AbandonedReclaimTimeV6** | Pointer to **int64** | The abandoned reclaim time in seconds for IPV6 clients. | [optional] [default to 3600] **AllowUnknown** | Pointer to **bool** | Disable to allow leases only for known IPv4 clients, those for which a fixed address is configured. | [optional] [default to true] **AllowUnknownV6** | Pointer to **bool** | Disable to allow leases only for known IPV6 clients, those for which a fixed address is configured. | [optional] [default to true] +**EchoClientId** | Pointer to **bool** | Enable/disable to include/exclude the client id when responding to discover or request. | [optional] [default to false] **Filters** | Pointer to **[]string** | The resource identifier. | [optional] **FiltersV6** | Pointer to **[]string** | The resource identifier. | [optional] **IgnoreClientUid** | Pointer to **bool** | Enable to ignore the client UID when issuing a DHCP lease. Use this option to prevent assigning two IP addresses for a client which does not have a UID during one phase of PXE boot but acquires one for the other phase. | [optional] [default to false] @@ -134,6 +135,31 @@ SetAllowUnknownV6 sets AllowUnknownV6 field to given value. HasAllowUnknownV6 returns a boolean if a field has been set. +### GetEchoClientId + +`func (o *IpamsvcDHCPConfig) GetEchoClientId() bool` + +GetEchoClientId returns the EchoClientId field if non-nil, zero value otherwise. + +### GetEchoClientIdOk + +`func (o *IpamsvcDHCPConfig) GetEchoClientIdOk() (*bool, bool)` + +GetEchoClientIdOk returns a tuple with the EchoClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEchoClientId + +`func (o *IpamsvcDHCPConfig) SetEchoClientId(v bool)` + +SetEchoClientId sets EchoClientId field to given value. + +### HasEchoClientId + +`func (o *IpamsvcDHCPConfig) HasEchoClientId() bool` + +HasEchoClientId returns a boolean if a field has been set. + ### GetFilters `func (o *IpamsvcDHCPConfig) GetFilters() []string` diff --git a/ipam/docs/IpamsvcInheritedDHCPConfig.md b/ipam/docs/IpamsvcInheritedDHCPConfig.md index c8b475d..ab441ec 100644 --- a/ipam/docs/IpamsvcInheritedDHCPConfig.md +++ b/ipam/docs/IpamsvcInheritedDHCPConfig.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **AbandonedReclaimTimeV6** | Pointer to [**InheritanceInheritedUInt32**](InheritanceInheritedUInt32.md) | | [optional] **AllowUnknown** | Pointer to [**InheritanceInheritedBool**](InheritanceInheritedBool.md) | | [optional] **AllowUnknownV6** | Pointer to [**InheritanceInheritedBool**](InheritanceInheritedBool.md) | | [optional] +**EchoClientId** | Pointer to [**InheritanceInheritedBool**](InheritanceInheritedBool.md) | | [optional] **Filters** | Pointer to [**InheritedDHCPConfigFilterList**](InheritedDHCPConfigFilterList.md) | | [optional] **FiltersV6** | Pointer to [**InheritedDHCPConfigFilterList**](InheritedDHCPConfigFilterList.md) | | [optional] **IgnoreClientUid** | Pointer to [**InheritanceInheritedBool**](InheritanceInheritedBool.md) | | [optional] @@ -134,6 +135,31 @@ SetAllowUnknownV6 sets AllowUnknownV6 field to given value. HasAllowUnknownV6 returns a boolean if a field has been set. +### GetEchoClientId + +`func (o *IpamsvcInheritedDHCPConfig) GetEchoClientId() InheritanceInheritedBool` + +GetEchoClientId returns the EchoClientId field if non-nil, zero value otherwise. + +### GetEchoClientIdOk + +`func (o *IpamsvcInheritedDHCPConfig) GetEchoClientIdOk() (*InheritanceInheritedBool, bool)` + +GetEchoClientIdOk returns a tuple with the EchoClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEchoClientId + +`func (o *IpamsvcInheritedDHCPConfig) SetEchoClientId(v InheritanceInheritedBool)` + +SetEchoClientId sets EchoClientId field to given value. + +### HasEchoClientId + +`func (o *IpamsvcInheritedDHCPConfig) HasEchoClientId() bool` + +HasEchoClientId returns a boolean if a field has been set. + ### GetFilters `func (o *IpamsvcInheritedDHCPConfig) GetFilters() InheritedDHCPConfigFilterList` diff --git a/ipam/model_ipamsvc_dhcp_config.go b/ipam/model_ipamsvc_dhcp_config.go index fe59f6c..a00f020 100644 --- a/ipam/model_ipamsvc_dhcp_config.go +++ b/ipam/model_ipamsvc_dhcp_config.go @@ -27,6 +27,8 @@ type IpamsvcDHCPConfig struct { AllowUnknown *bool `json:"allow_unknown,omitempty"` // Disable to allow leases only for known IPV6 clients, those for which a fixed address is configured. AllowUnknownV6 *bool `json:"allow_unknown_v6,omitempty"` + // Enable/disable to include/exclude the client id when responding to discover or request. + EchoClientId *bool `json:"echo_client_id,omitempty"` // The resource identifier. Filters []string `json:"filters,omitempty"` // The resource identifier. @@ -55,6 +57,8 @@ func NewIpamsvcDHCPConfig() *IpamsvcDHCPConfig { this.AllowUnknown = &allowUnknown var allowUnknownV6 bool = true this.AllowUnknownV6 = &allowUnknownV6 + var echoClientId bool = false + this.EchoClientId = &echoClientId var ignoreClientUid bool = false this.IgnoreClientUid = &ignoreClientUid var leaseTime int64 = 3600 @@ -77,6 +81,8 @@ func NewIpamsvcDHCPConfigWithDefaults() *IpamsvcDHCPConfig { this.AllowUnknown = &allowUnknown var allowUnknownV6 bool = true this.AllowUnknownV6 = &allowUnknownV6 + var echoClientId bool = false + this.EchoClientId = &echoClientId var ignoreClientUid bool = false this.IgnoreClientUid = &ignoreClientUid var leaseTime int64 = 3600 @@ -214,6 +220,38 @@ func (o *IpamsvcDHCPConfig) SetAllowUnknownV6(v bool) { o.AllowUnknownV6 = &v } +// GetEchoClientId returns the EchoClientId field value if set, zero value otherwise. +func (o *IpamsvcDHCPConfig) GetEchoClientId() bool { + if o == nil || IsNil(o.EchoClientId) { + var ret bool + return ret + } + return *o.EchoClientId +} + +// GetEchoClientIdOk returns a tuple with the EchoClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IpamsvcDHCPConfig) GetEchoClientIdOk() (*bool, bool) { + if o == nil || IsNil(o.EchoClientId) { + return nil, false + } + return o.EchoClientId, true +} + +// HasEchoClientId returns a boolean if a field has been set. +func (o *IpamsvcDHCPConfig) HasEchoClientId() bool { + if o != nil && !IsNil(o.EchoClientId) { + return true + } + + return false +} + +// SetEchoClientId gets a reference to the given bool and assigns it to the EchoClientId field. +func (o *IpamsvcDHCPConfig) SetEchoClientId(v bool) { + o.EchoClientId = &v +} + // GetFilters returns the Filters field value if set, zero value otherwise. func (o *IpamsvcDHCPConfig) GetFilters() []string { if o == nil || IsNil(o.Filters) { @@ -428,6 +466,9 @@ func (o IpamsvcDHCPConfig) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowUnknownV6) { toSerialize["allow_unknown_v6"] = o.AllowUnknownV6 } + if !IsNil(o.EchoClientId) { + toSerialize["echo_client_id"] = o.EchoClientId + } if !IsNil(o.Filters) { toSerialize["filters"] = o.Filters } diff --git a/ipam/model_ipamsvc_inherited_dhcp_config.go b/ipam/model_ipamsvc_inherited_dhcp_config.go index 8a62fdd..6530846 100644 --- a/ipam/model_ipamsvc_inherited_dhcp_config.go +++ b/ipam/model_ipamsvc_inherited_dhcp_config.go @@ -23,6 +23,7 @@ type IpamsvcInheritedDHCPConfig struct { AbandonedReclaimTimeV6 *InheritanceInheritedUInt32 `json:"abandoned_reclaim_time_v6,omitempty"` AllowUnknown *InheritanceInheritedBool `json:"allow_unknown,omitempty"` AllowUnknownV6 *InheritanceInheritedBool `json:"allow_unknown_v6,omitempty"` + EchoClientId *InheritanceInheritedBool `json:"echo_client_id,omitempty"` Filters *InheritedDHCPConfigFilterList `json:"filters,omitempty"` FiltersV6 *InheritedDHCPConfigFilterList `json:"filters_v6,omitempty"` IgnoreClientUid *InheritanceInheritedBool `json:"ignore_client_uid,omitempty"` @@ -176,6 +177,38 @@ func (o *IpamsvcInheritedDHCPConfig) SetAllowUnknownV6(v InheritanceInheritedBoo o.AllowUnknownV6 = &v } +// GetEchoClientId returns the EchoClientId field value if set, zero value otherwise. +func (o *IpamsvcInheritedDHCPConfig) GetEchoClientId() InheritanceInheritedBool { + if o == nil || IsNil(o.EchoClientId) { + var ret InheritanceInheritedBool + return ret + } + return *o.EchoClientId +} + +// GetEchoClientIdOk returns a tuple with the EchoClientId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IpamsvcInheritedDHCPConfig) GetEchoClientIdOk() (*InheritanceInheritedBool, bool) { + if o == nil || IsNil(o.EchoClientId) { + return nil, false + } + return o.EchoClientId, true +} + +// HasEchoClientId returns a boolean if a field has been set. +func (o *IpamsvcInheritedDHCPConfig) HasEchoClientId() bool { + if o != nil && !IsNil(o.EchoClientId) { + return true + } + + return false +} + +// SetEchoClientId gets a reference to the given InheritanceInheritedBool and assigns it to the EchoClientId field. +func (o *IpamsvcInheritedDHCPConfig) SetEchoClientId(v InheritanceInheritedBool) { + o.EchoClientId = &v +} + // GetFilters returns the Filters field value if set, zero value otherwise. func (o *IpamsvcInheritedDHCPConfig) GetFilters() InheritedDHCPConfigFilterList { if o == nil || IsNil(o.Filters) { @@ -390,6 +423,9 @@ func (o IpamsvcInheritedDHCPConfig) ToMap() (map[string]interface{}, error) { if !IsNil(o.AllowUnknownV6) { toSerialize["allow_unknown_v6"] = o.AllowUnknownV6 } + if !IsNil(o.EchoClientId) { + toSerialize["echo_client_id"] = o.EchoClientId + } if !IsNil(o.Filters) { toSerialize["filters"] = o.Filters }