mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-06 09:06:44 +00:00
![Dana Hoffman](/assets/img/avatar_default.png)
* Revert "Merge pull request #1434 from terraform-providers/paddy_revert_beta" This reverts commit118cd71201
, reversing changes made tod59fcbbc59
. * add ConvertSelfLinkToV1 calls to places where beta links are stored
42 lines
730 B
Go
42 lines
730 B
Go
package google
|
|
|
|
type ResourceDataMock struct {
|
|
FieldsInSchema map[string]interface{}
|
|
FieldsWithHasChange []string
|
|
id string
|
|
}
|
|
|
|
func (d *ResourceDataMock) HasChange(key string) bool {
|
|
exists := false
|
|
for _, val := range d.FieldsWithHasChange {
|
|
if key == val {
|
|
exists = true
|
|
}
|
|
}
|
|
|
|
return exists
|
|
}
|
|
|
|
func (d *ResourceDataMock) GetOk(key string) (interface{}, bool) {
|
|
for k, v := range d.FieldsInSchema {
|
|
if key == k {
|
|
return v, true
|
|
}
|
|
}
|
|
|
|
return nil, false
|
|
}
|
|
|
|
func (d *ResourceDataMock) Set(key string, value interface{}) error {
|
|
d.FieldsInSchema[key] = value
|
|
return nil
|
|
}
|
|
|
|
func (d *ResourceDataMock) SetId(v string) {
|
|
d.id = v
|
|
}
|
|
|
|
func (d *ResourceDataMock) Id() string {
|
|
return d.id
|
|
}
|